mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
Merge pull request #14478 from iagocalazans/patch-1
This commit is contained in:
commit
35c806088a
@ -11,9 +11,8 @@ type InitializerProps = {
|
||||
setPlugin: (id: string) => void;
|
||||
};
|
||||
|
||||
const Initializer: React.FC<InitializerProps> = ({ setPlugin }) => {
|
||||
const ref = useRef<(id: string) => void | null>(null);
|
||||
ref.current = setPlugin;
|
||||
const Initializer = ({ setPlugin }: InitializerProps) => {
|
||||
const ref = useRef(setPlugin);
|
||||
|
||||
useEffect(() => {
|
||||
ref.current(pluginId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user