Skip to content

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.

chore: optimize code

JimmFly21f9f87cb2e4
diff --git a/packages/app/src/components/quick-search/index.tsx b/packages/app/src/components/quick-search/index.tsx
index 9400f72031..7c24f0b970 100644
--- a/packages/app/src/components/quick-search/index.tsx
+++ b/packages/app/src/components/quick-search/index.tsx
@@ -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);