diff options
Diffstat (limited to 'admin/src/components/Initializer.tsx')
| -rw-r--r-- | admin/src/components/Initializer.tsx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/admin/src/components/Initializer.tsx b/admin/src/components/Initializer.tsx new file mode 100644 index 0000000..8188291 --- /dev/null +++ b/admin/src/components/Initializer.tsx @@ -0,0 +1,19 @@ +import { useEffect, useRef } from 'react'; + +import { PLUGIN_ID } from '../pluginId'; + +type InitializerProps = { + setPlugin: (id: string) => void; +}; + +const Initializer = ({ setPlugin }: InitializerProps) => { + const ref = useRef(setPlugin); + + useEffect(() => { + ref.current(PLUGIN_ID); + }, []); + + return null; +}; + +export { Initializer }; |
