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

View File

@@ -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}>

View File

@@ -32,7 +32,7 @@ export const PublicLinkDisableModal = ({
portal: document.body,
});
onClose();
}, []);
}, [onClose, setIsPublic]);
return (
<Modal open={open} onClose={onClose}>
<StyledModalWrapper>