Spaces:
Configuration error
Configuration error
Download web/libs/editor/src/components/App/Annotation.js from bisalsaha/lebel-studio: direct link, hf CLI and curl.
- Browser
- Download file 413 Bytes
-
https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/web/libs/editor/src/components/App/Annotation.js
- Command line
-
hf download hf://spaces/bisalsaha/lebel-studio/web/libs/editor/src/components/App/Annotation.js
-
curl -L -o Annotation.js https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/web/libs/editor/src/components/App/Annotation.js
413 Bytes
| import Tree from "../../core/Tree"; | |
| import { isAlive } from "mobx-state-tree"; | |
| import { useLayoutEffect } from "react"; | |
| export function Annotation({ annotation, root }) { | |
| useLayoutEffect(() => { | |
| return () => { | |
| if (annotation && isAlive(annotation)) { | |
| annotation.resetReady(); | |
| } | |
| }; | |
| }, [annotation?.pk, annotation?.id]); | |
| return root ? Tree.renderItem(root, annotation) : null; | |
| } | |