Skip to content

armgit / ente

Public Imported from GitHub
0

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

Use

Manav Rathi038a08f583be
diff --git a/web/apps/photos/src/components/DeleteAccountModal.tsx b/web/apps/photos/src/components/DeleteAccountModal.tsx
index 7fccf9a54a..bea832ebe0 100644
--- a/web/apps/photos/src/components/DeleteAccountModal.tsx
+++ b/web/apps/photos/src/components/DeleteAccountModal.tsx
@@ -23,7 +23,7 @@ import React, { useContext, useRef, useState } from "react";
import { Trans } from "react-i18next";
import { deleteAccount, getAccountDeleteChallenge } from "services/userService";
import * as Yup from "yup";
-import DropdownInput, { DropdownOption } from "./DropdownInput";
+import { DropdownInput_, DropdownOption } from "./DropdownInput";
interface Iprops {
onClose: () => void;
@@ -152,18 +152,28 @@ const DeleteAccountModal = ({ open, onClose }: Iprops) => {
handleSubmit,
}): React.JSX.Element => (
<form noValidate onSubmit={handleSubmit}>
- <Stack spacing={"24px"}>
- <DropdownInput
- options={deleteReasonOptions()}
- label={t("delete_account_reason_label")}
- placeholder={t(
- "delete_account_reason_placeholder",
+ <Stack sx={{ gap: "24px" }}>
+ <Stack sx={{ gap: "4px" }}>
+ <Typography>
+ {t("delete_account_reason_label")}
+ </Typography>
+ <DropdownInput_
+ options={deleteReasonOptions()}
+ placeholder={t(
+ "delete_account_reason_placeholder",
+ )}
+ selected={values.reason}
+ setSelected={handleChange("reason")}
+ />
+ {errors.reason && (
+ <Typography
+ variant="small"
+ sx={{ px: 1, color: "critical.main" }}
+ >
+ {errors.reason}
+ </Typography>
)}
- selected={values.reason}
- setSelected={handleChange("reason")}
- messageSxProps={{ color: "critical.main" }}
- message={errors.reason}
- />
+ </Stack>
<FeedbackInput
value={values.feedback}
onChange={handleChange("feedback")}
diff --git a/web/apps/photos/src/components/DropdownInput.tsx b/web/apps/photos/src/components/DropdownInput.tsx
index f798dc60b4..93375e4328 100644
--- a/web/apps/photos/src/components/DropdownInput.tsx
+++ b/web/apps/photos/src/components/DropdownInput.tsx
@@ -71,7 +71,7 @@ interface DropdownInputProps_<T> {
placeholder?: string;
}
-const DropdownInput_ = <T extends string>({
+export const DropdownInput_ = <T extends string>({
options,
selected,
setSelected,