refactor(infra): move currentPageAtom to core (#5332)

Remove `currentPageAtom` from `infra` to `frontend/core.`
This commit is contained in:
EYHN
2023-12-25 03:34:28 +00:00
parent e1bd13a018
commit 9493bd99f9
8 changed files with 10 additions and 11 deletions
@@ -2,11 +2,12 @@ import {
currentWorkspaceAtom,
workspaceListAtom,
} from '@affine/workspace/atom';
import { currentPageIdAtom } from '@toeverything/infra/atom';
import { useAtomValue } from 'jotai/react';
import { useEffect } from 'react';
import { useLocation, useParams } from 'react-router-dom';
import { currentPageIdAtom } from '../../../../atoms/mode';
export interface DumpInfoProps {
error: any;
}
@@ -12,7 +12,7 @@ import {
useBlockSuitePageMeta,
usePageMetaHelper,
} from '@toeverything/hooks/use-block-suite-page-meta';
import { currentPageIdAtom, getCurrentStore } from '@toeverything/infra/atom';
import { getCurrentStore } from '@toeverything/infra/atom';
import {
type AffineCommand,
AffineCommandRegistry,
@@ -29,6 +29,7 @@ import {
recentPageIdsBaseAtom,
} from '../../../atoms';
import { collectionsCRUDAtom } from '../../../atoms/collections';
import { currentPageIdAtom } from '../../../atoms/mode';
import { useNavigateHelper } from '../../../hooks/use-navigate-helper';
import { WorkspaceSubPath } from '../../../shared';
import { usePageHelper } from '../../blocksuite/block-suite-page-list/utils';