| 1 |
import { useEffect } from '@wordpress/element'; |
| 2 |
import { select } from '@wordpress/data'; |
| 3 |
|
| 4 |
import { duplicateBlockIdFix } from "../util/helpers"; |
| 5 |
|
| 6 |
const useDuplicateBlockIdFix = (blockPrefix, blockId, clientId, setAttributes) => { |
| 7 |
useEffect(() => { |
| 8 |
duplicateBlockIdFix({ |
| 9 |
BLOCK_PREFIX: blockPrefix, |
| 10 |
blockId, |
| 11 |
setAttributes, |
| 12 |
select, |
| 13 |
clientId, |
| 14 |
}); |
| 15 |
}, []); |
| 16 |
} |
| 17 |
|
| 18 |
export default useDuplicateBlockIdFix; |
| 19 |
|