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