fix: effect deps (#1940)

This commit is contained in:
Himself65
2023-04-14 00:24:44 -05:00
committed by GitHub
parent d58f9db289
commit 5ca94db5d2
11 changed files with 22 additions and 15 deletions
@@ -50,7 +50,7 @@ const BlockSuiteEditorImpl = (props: EditorProps): ReactElement => {
}
props.onLoad?.(page, editor);
}
}, [props.page, props.onInit, props.onLoad]);
}, [props.page, props.onInit, props.onLoad, editor, props, page]);
const ref = useRef<HTMLDivElement>(null);
@@ -53,10 +53,10 @@ export const AffineSharePage: FC<ShareMenuProps> = props => {
}, [props.workspace.id, props.currentPage.id]);
const onClickCreateLink = useCallback(() => {
setIsPublic(true);
}, [isPublic]);
}, [setIsPublic]);
const onClickCopyLink = useCallback(() => {
navigator.clipboard.writeText(sharingUrl);
}, []);
}, [sharingUrl]);
return (
<div className={menuItemStyle}>
@@ -32,7 +32,7 @@ export const PublicLinkDisableModal = ({
portal: document.body,
});
onClose();
}, []);
}, [onClose, setIsPublic]);
return (
<Modal open={open} onClose={onClose}>
<StyledModalWrapper>