mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-28 11:53:24 +03:00
chore: optimize code
This commit is contained in:
parent
d9ad8ee608
commit
21f9f87cb2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user