mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor(infra): move currentPageAtom to core (#5332)
Remove `currentPageAtom` from `infra` to `frontend/core.`
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user