mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 21:38:44 +08:00
fix:shapaes bidings error
This commit is contained in:
@@ -115,19 +115,3 @@ export const useShapes = (workspace: string, rootBlockId: string) => {
|
||||
bindings: JSON.parse(blocks?.bindings ?? '{}'),
|
||||
};
|
||||
};
|
||||
|
||||
export const useBindings = (workspace: string, rootBlockId: string) => {
|
||||
const [bindings, setBindings] = useState<string>();
|
||||
useEffect(() => {
|
||||
services.api.editorBlock
|
||||
.get({
|
||||
workspace: workspace,
|
||||
ids: [rootBlockId],
|
||||
})
|
||||
.then(blcoks => {
|
||||
setBindings(blcoks[0].properties.bindings?.value);
|
||||
});
|
||||
return () => {};
|
||||
}, [workspace, rootBlockId]);
|
||||
return bindings ? JSON.parse(bindings) : {};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user