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

View File

@@ -1,8 +1,9 @@
import { currentPageIdAtom } from '@toeverything/infra/atom';
import { atom } from 'jotai/vanilla';
import { pageSettingFamily } from './index';
export const currentPageIdAtom = atom<string | null>(null);
export const currentModeAtom = atom<'page' | 'edgeless'>(get => {
const pageId = get(currentPageIdAtom);
if (!pageId) {