mirror of
https://github.com/usememos/memos.git
synced 2026-12-03 09:19:13 +01:00
chore: remove useAppContext in dialog props
This commit is contained in:
5 files changed
+6
-13
No files matched your search
@@ -6,7 +6,6 @@ import "../../less/base-dialog.less";
|
||||
|
||||
interface DialogConfig {
|
||||
className: string;
|
||||
useAppContext?: boolean;
|
||||
clickSpaceDestroy?: boolean;
|
||||
}
|
||||
|
||||
@@ -61,16 +60,14 @@ export function generateDialog<T extends DialogProps>(
|
||||
destroy: cbs.destroy,
|
||||
} as T;
|
||||
|
||||
let Fragment = (
|
||||
<BaseDialog destroy={cbs.destroy} clickSpaceDestroy={true} {...config}>
|
||||
<DialogComponent {...dialogProps} />
|
||||
</BaseDialog>
|
||||
const Fragment = (
|
||||
<Provider store={store}>
|
||||
<BaseDialog destroy={cbs.destroy} clickSpaceDestroy={true} {...config}>
|
||||
<DialogComponent {...dialogProps} />
|
||||
</BaseDialog>
|
||||
</Provider>
|
||||
);
|
||||
|
||||
if (config.useAppContext) {
|
||||
Fragment = <Provider store={store}>{Fragment}</Provider>;
|
||||
}
|
||||
|
||||
dialog.render(Fragment);
|
||||
|
||||
return cbs;
|
||||
|
||||
Reference in new issue
Block a user