Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

md

Manav Rathi07995dcbb862
diff --git a/web/apps/photos/src/components/Sidebar/TwoFactorSettings.tsx b/web/apps/photos/src/components/Sidebar/TwoFactorSettings.tsx
index 8ef0c43478..d00d2dfbd3 100644
--- a/web/apps/photos/src/components/Sidebar/TwoFactorSettings.tsx
+++ b/web/apps/photos/src/components/Sidebar/TwoFactorSettings.tsx
@@ -109,7 +109,7 @@ interface TwoFactorModalManageSectionProps {
function TwoFactorModalManageSection(props: TwoFactorModalManageSectionProps) {
const { closeDialog } = props;
- const { showMiniDialog, setDialogMessage } = useAppContext();
+ const { showMiniDialog } = useAppContext();
const confirmDisable = () =>
showMiniDialog({
@@ -131,21 +131,17 @@ function TwoFactorModalManageSection(props: TwoFactorModalManageSectionProps) {
closeDialog();
};
- const warnTwoFactorReconfigure = async () => {
- setDialogMessage({
+ const confirmReconfigure = () =>
+ showMiniDialog({
title: t("UPDATE_TWO_FACTOR"),
-
- content: t("UPDATE_TWO_FACTOR_MESSAGE"),
- close: { text: t("cancel") },
- proceed: {
- variant: "accent",
+ message: t("UPDATE_TWO_FACTOR_MESSAGE"),
+ continue: {
text: t("UPDATE"),
- action: reconfigureTwoFactor,
+ action: reconfigure,
},
});
- };
- const reconfigureTwoFactor = async () => {
+ const reconfigure = () => {
closeDialog();
router.push(PAGES.TWO_FACTOR_SETUP);
};
@@ -164,7 +160,7 @@ function TwoFactorModalManageSection(props: TwoFactorModalManageSectionProps) {
<div>
<MenuItemGroup>
<EnteMenuItem
- onClick={warnTwoFactorReconfigure}
+ onClick={confirmReconfigure}
variant="primary"
checked={true}
label={t("reconfigure")}