mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 19:46:32 +08:00
refactor(web): move current atoms into plugin infra (#3220)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { rootCurrentPageIdAtom } from '@affine/workspace/atom';
|
||||
import { currentPageIdAtom } from '@toeverything/plugin-infra/manager';
|
||||
import { atom, useAtomValue } from 'jotai';
|
||||
|
||||
import { pageSettingFamily } from '../../atoms';
|
||||
|
||||
const currentModeAtom = atom<'page' | 'edgeless'>(get => {
|
||||
const pageId = get(rootCurrentPageIdAtom);
|
||||
const pageId = get(currentPageIdAtom);
|
||||
// fixme(himself65): pageId should not be null
|
||||
if (!pageId) {
|
||||
return 'page';
|
||||
|
||||
Reference in New Issue
Block a user