chore: remove currentWorkspaceId & currentMetaWorkspace

This commit is contained in:
QiShaoXuan
2023-01-11 16:33:25 +08:00
parent 8e8e18fdf9
commit 926bb7fd14
19 changed files with 37 additions and 116 deletions
@@ -73,7 +73,7 @@ export const PageList = ({
isTrash?: boolean;
}) => {
const router = useRouter();
const { currentWorkspaceId } = useAppState();
const { currentWorkspace } = useAppState();
const { t } = useTranslation();
if (pageList.length === 0) {
return <Empty />;
@@ -99,7 +99,7 @@ export const PageList = ({
key={`${pageMeta.id}-${index}`}
onClick={() => {
router.push(
`/workspace/${currentWorkspaceId}/${pageMeta.id}`
`/workspace/${currentWorkspace?.id}/${pageMeta.id}`
);
}}
>