refactor: move @/ui/display/icon to twenty-ui (#4820)
Split from https://github.com/twentyhq/twenty/pull/4518 Part of https://github.com/twentyhq/twenty/issues/4766
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
|
||||
import { iconsState } from '@ui/display/icon/states/iconsState';
|
||||
|
||||
type IconsProviderProps = {
|
||||
children: JSX.Element;
|
||||
};
|
||||
|
||||
export const IconsProvider = ({ children }: IconsProviderProps) => {
|
||||
const setIcons = useSetRecoilState(iconsState);
|
||||
|
||||
useEffect(() => {
|
||||
import('./internal/AllIcons').then((lazyLoadedIcons) => {
|
||||
setIcons(lazyLoadedIcons.ALL_ICONS);
|
||||
});
|
||||
}, [setIcons]);
|
||||
|
||||
return children;
|
||||
};
|
||||
8396
packages/twenty-ui/src/display/icon/providers/internal/AllIcons.ts
Normal file
8396
packages/twenty-ui/src/display/icon/providers/internal/AllIcons.ts
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user