diff --git a/packages/plugins/graph-collection-manager/src/client/GraphDrawPage.tsx b/packages/plugins/graph-collection-manager/src/client/GraphDrawPage.tsx index 655b66c68c..7b6490d4d4 100644 --- a/packages/plugins/graph-collection-manager/src/client/GraphDrawPage.tsx +++ b/packages/plugins/graph-collection-manager/src/client/GraphDrawPage.tsx @@ -375,9 +375,10 @@ export const GraphDrawPage = React.memo(() => { const [collectionData, setCollectionData] = useState([]); const [collectionList, setCollectionList] = useState([]); const { refreshCM } = useCollectionManager(); + const currentAppInfo = useCurrentAppInfo(); const { data: { database }, - } = useCurrentAppInfo(); + } = currentAppInfo; const categoryCtx = useContext(CollectionCategroriesContext); const scope = { ...options?.scope }; const components = { ...options?.components }; @@ -506,7 +507,7 @@ export const GraphDrawPage = React.memo(() => { { inherit: 'react-shape', component: (node) => ( - + diff --git a/packages/plugins/graph-collection-manager/src/client/components/Entity.tsx b/packages/plugins/graph-collection-manager/src/client/components/Entity.tsx index 3c7afddf94..2895668e26 100644 --- a/packages/plugins/graph-collection-manager/src/client/components/Entity.tsx +++ b/packages/plugins/graph-collection-manager/src/client/components/Entity.tsx @@ -186,6 +186,7 @@ const PortsCom = React.memo(({ targetGraph, collectionData, setTargetNode, const [collapse, setCollapse] = useState(false); const { t } = useGCMTranslation(); const compile = useCompile(); + const { styles } = useStyles(); const { data: { database }, } = useCurrentAppInfo(); @@ -204,9 +205,7 @@ const PortsCom = React.memo(({ targetGraph, collectionData, setTargetNode, return `${prefix || ''}${uid()}`; }; const CollectionConten = (data) => { - const { styles } = useStyles(); const { type, name, primaryKey, allowNull, autoIncrement } = data; - return (