mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 18:16:15 +08:00
10 lines
291 B
TypeScript
10 lines
291 B
TypeScript
import * as React from 'react';
|
|
import type { TldrawApp } from '@toeverything/components/board-state';
|
|
|
|
export const TldrawContext = React.createContext<TldrawApp>({} as TldrawApp);
|
|
|
|
export function useTldrawApp() {
|
|
const context = React.useContext(TldrawContext);
|
|
return context;
|
|
}
|