mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 03:49:56 +08:00
chore: optimize code
This commit is contained in:
@@ -54,10 +54,7 @@ export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
|
|||||||
}, [open, triggerQuickSearchModal]);
|
}, [open, triggerQuickSearchModal]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (router.pathname.startsWith('/public-workspace')) {
|
||||||
router.pathname === '/public-workspace/[workspaceId]/[pageId]' ||
|
|
||||||
router.pathname === '/public-workspace/[workspaceId]'
|
|
||||||
) {
|
|
||||||
return setIsPublic(true);
|
return setIsPublic(true);
|
||||||
} else {
|
} else {
|
||||||
return setIsPublic(false);
|
return setIsPublic(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user