feat(core): open restore history confirm modal with hook (#6343)

This commit is contained in:
CatsJuice
2024-03-27 13:30:36 +00:00
parent d412635f6b
commit 710edd28db
2 changed files with 23 additions and 69 deletions

View File

@@ -5,6 +5,8 @@ import { Provider } from 'jotai';
import type { PropsWithChildren } from 'react';
import { useMemo } from 'react';
import { ConfirmModalProvider } from '../../ui/modal';
export type AffineContextProps = PropsWithChildren<{
store?: ReturnType<typeof createStore>;
}>;
@@ -17,6 +19,7 @@ export function AffineContext(props: AffineContextProps) {
[
<Provider key="JotaiProvider" store={props.store} />,
<ThemeProvider key="ThemeProvider" />,
<ConfirmModalProvider key="ConfirmModalProvider" />,
].filter(Boolean),
[props.store]
)}