mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 00:56:26 +08:00
13 lines
303 B
TypeScript
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);
|
|
}
|