There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix: unexpected pop ups (#4468)
JimmFly2e1acec3c0ae
diff --git a/packages/component/src/components/share-menu/share-page.tsx b/packages/component/src/components/share-menu/share-page.tsxindex c4dbc5f62c..f8d7219fea 100644--- a/packages/component/src/components/share-menu/share-page.tsx+++ b/packages/component/src/components/share-menu/share-page.tsx@@ -42,6 +42,7 @@ const CloudSvg = () => (export const LocalSharePage = (props: ShareMenuProps) => {const t = useAFFiNEI18N();+return (<><div className={styles.titleContainerStyle}>@@ -73,15 +74,21 @@ export const AffineSharePage = (props: ShareMenuProps) => {workspace: { id: workspaceId },currentPage: { id: pageId },} = props;+const [isPublic, setIsPublic] = props.useIsSharedPage(workspaceId, pageId);+const [showDisable, setShowDisable] = useState(false);+const t = useAFFiNEI18N();+const sharingUrl = useMemo(() => {return `${runtimeConfig.serverUrlPrefix}/share/${workspaceId}/${pageId}`;}, [workspaceId, pageId]);+const onClickCreateLink = useCallback(() => {setIsPublic(true);}, [setIsPublic]);+const onClickCopyLink = useCallback(() => {navigator.clipboard.writeText(sharingUrl)@@ -92,11 +99,13 @@ export const AffineSharePage = (props: ShareMenuProps) => {console.error(err);});}, [sharingUrl, t]);+const onDisablePublic = useCallback(() => {setIsPublic(false);toast('Successfully disabled', {portal: document.body,});+ setShowDisable(false);}, [setIsPublic]);return (