mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 05:29:08 +08:00
feat(core): import template (#8000)
This commit is contained in:
@@ -153,14 +153,19 @@ export const ModalInner = forwardRef<HTMLDivElement, ModalProps>(
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const container = createContainer();
|
||||
setContainer(container);
|
||||
return () => {
|
||||
setTimeout(() => {
|
||||
container.remove();
|
||||
}, 1000) as unknown as number;
|
||||
};
|
||||
}, []);
|
||||
if (open) {
|
||||
const container = createContainer();
|
||||
setContainer(container);
|
||||
return () => {
|
||||
setTimeout(() => {
|
||||
container.remove();
|
||||
}, 1000) as unknown as number;
|
||||
};
|
||||
} else {
|
||||
setContainer(null);
|
||||
return;
|
||||
}
|
||||
}, [open]);
|
||||
|
||||
const handlePointerDownOutSide = useCallback(
|
||||
(e: PointerDownOutsideEvent) => {
|
||||
|
||||
Reference in New Issue
Block a user