mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 06:15:48 +01:00
refactor(react/dialogs): integrate proper closing of modal
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import ReactBasicWidget from "../react/ReactBasicWidget";
|
||||
import Modal from "../react/Modal";
|
||||
import Button from "../react/Button";
|
||||
import { closeActiveDialog } from "../../services/dialog";
|
||||
import { t } from "../../services/i18n";
|
||||
import { useState } from "react";
|
||||
import FormCheckbox from "../react/FormCheckbox";
|
||||
@@ -48,10 +47,10 @@ function ConfirmDialogComponent() {
|
||||
setShown(false);
|
||||
}}
|
||||
footer={<>
|
||||
<Button text={t("confirm.cancel")} onClick={() => closeActiveDialog()} />
|
||||
<Button text={t("confirm.cancel")} onClick={() => setShown(false)} />
|
||||
<Button text={t("confirm.ok")} onClick={() => {
|
||||
setConfirmed(true);
|
||||
closeActiveDialog();
|
||||
setShown(false);
|
||||
}} />
|
||||
</>}
|
||||
show={shown}
|
||||
|
||||
Reference in New Issue
Block a user