refactor: mode atom (#3221)

This commit is contained in:
Alex Yang
2023-07-13 23:11:00 +08:00
parent 02946a0f4f
commit 735d91a003
4 changed files with 18 additions and 22 deletions
@@ -23,7 +23,7 @@ import {
import { guideDownloadClientTipAtom } from '../../../atoms/guide';
import { contentLayoutAtom } from '../../../atoms/layout';
import { useCurrentMode } from '../../../hooks/current/use-current-mode';
import { currentModeAtom } from '../../../atoms/mode';
import type { AffineOfficialWorkspace } from '../../../shared';
import { DownloadClientTip } from './download-tips';
import EditPage from './header-right-items/edit-page';
@@ -205,7 +205,7 @@ export const Header = forwardRef<
const open = useAtomValue(appSidebarOpenAtom);
const appSidebarFloating = useAtomValue(appSidebarFloatingAtom);
const mode = useCurrentMode();
const mode = useAtomValue(currentModeAtom);
return (
<div