diff --git a/web/apps/photos/src/components/DeleteAccountModal.tsx b/web/apps/photos/src/components/DeleteAccountModal.tsx
index 795d96bfb3..51e05086a1 100644
--- a/web/apps/photos/src/components/DeleteAccountModal.tsx
+++ b/web/apps/photos/src/components/DeleteAccountModal.tsx
@@ -116,87 +116,85 @@ const DeleteAccountModal = ({ open, onClose }: Iprops) => {
};
return (
- <>
-
+
+ initialValues={{
+ reason: "",
+ feedback: "",
+ }}
+ validationSchema={Yup.object().shape({
+ reason: Yup.string().required(t("required")),
+ })}
+ validateOnChange={false}
+ validateOnBlur={false}
+ onSubmit={initiateDelete}
>
-
- initialValues={{
- reason: "",
- feedback: "",
- }}
- validationSchema={Yup.object().shape({
- reason: Yup.string().required(t("required")),
- })}
- validateOnChange={false}
- validateOnBlur={false}
- onSubmit={initiateDelete}
- >
- {({
- values,
- errors,
- handleChange,
- handleSubmit,
- }): JSX.Element => (
-
-
- >
+
+
+ )}
+
+
);
};
diff --git a/web/apps/photos/src/components/Sidebar/index.tsx b/web/apps/photos/src/components/Sidebar/index.tsx
index 118af9780c..db393b0056 100644
--- a/web/apps/photos/src/components/Sidebar/index.tsx
+++ b/web/apps/photos/src/components/Sidebar/index.tsx
@@ -612,43 +612,33 @@ const HelpSection: React.FC = () => {
};
const ExitSection: React.FC = () => {
- const { setDialogMessage, logout } = useContext(AppContext);
+ const { showMiniDialog, logout } = useContext(AppContext);
- const [deleteAccountModalView, setDeleteAccountModalView] = useState(false);
+ const { show: showDeleteAccount, props: deleteAccountVisibilityProps } =
+ useModalVisibility();
- const closeDeleteAccountModal = () => setDeleteAccountModalView(false);
- const openDeleteAccountModal = () => setDeleteAccountModalView(true);
-
- const confirmLogout = () => {
- setDialogMessage({
+ const handleLogout = () =>
+ showMiniDialog({
title: t("logout_message"),
- proceed: {
- text: t("logout"),
- action: logout,
- variant: "critical",
- },
- close: { text: t("cancel") },
+ continue: { text: t("logout"), color: "critical", action: logout },
+ buttonDirection: "row"
});
- };
return (
<>
-
+
>
);
};