Files
AFFiNE-Mirror/apps/web/src/hooks/current/use-current-page-id.ts
T
2023-07-06 03:49:17 +00:00

13 lines
303 B
TypeScript

import { rootCurrentPageIdAtom } from '@affine/workspace/atom';
import { useAtom } from 'jotai';
/**
* @deprecated Use `rootCurrentPageIdAtom` directly instead.
*/
export function useCurrentPageId(): [
string | null,
(newId: string | null) => void,
] {
return useAtom(rootCurrentPageIdAtom);
}