Unverified Commit cea16fac authored by XQ's avatar XQ Committed by GitHub

chore: remove `useAppContext` in dialog props

parent 7e994c8f
......@@ -66,7 +66,6 @@ export default function showArchivedMemoDialog(): void {
generateDialog(
{
className: "archived-memo-dialog",
useAppContext: true,
},
ArchivedMemoDialog,
{}
......
......@@ -113,7 +113,6 @@ export default function showDailyReviewDialog(datestamp: DateStamp = Date.now())
generateDialog(
{
className: "daily-review-dialog",
useAppContext: true,
},
DailyReviewDialog,
{ currentDateStamp: datestamp }
......
......@@ -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 = (
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;
......
......@@ -155,7 +155,6 @@ export default function showResourcesDialog() {
generateDialog(
{
className: "resources-dialog",
useAppContext: true,
},
ResourcesDialog,
{}
......
......@@ -80,7 +80,6 @@ export default function showSettingDialog(): void {
generateDialog(
{
className: "setting-dialog",
useAppContext: true,
},
SettingDialog,
{}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment