refactor(react/dialogs): integrate proper closing of modal

This commit is contained in:
Elian Doran
2025-08-10 12:22:11 +03:00
parent b7482f2a6a
commit da1f18c60f
22 changed files with 46 additions and 60 deletions

View File

@@ -1,5 +1,4 @@
import { useState } from "preact/hooks";
import { closeActiveDialog } from "../../services/dialog";
import { t } from "../../services/i18n";
import tree from "../../services/tree";
import Button from "../react/Button";
@@ -57,7 +56,7 @@ function ExportDialogComponent() {
const format = (exportType === "subtree" ? subtreeFormat : singleFormat);
const version = (format === "opml" ? opmlVersion : "1.0");
exportBranch(opts.branchId, exportType, format, version);
closeActiveDialog();
setShown(false);
}}
onHidden={() => setShown(false)}
footer={<Button className="export-button" text={t("export.export")} primary />}