import React, { useState } from "react"; import TextInput from "@/components/TextInput"; import Modal from "../Modal"; import { useTranslation } from "next-i18next"; type Props = { onClose: Function; onSubmit: Function; oldEmail: string; newEmail: string; }; export default function EmailChangeVerificationModal({ onClose, onSubmit, oldEmail, newEmail, }: Props) { const { t } = useTranslation(); const [password, setPassword] = useState(""); return (

{t("confirm_password")}

{t("password_change_warning")} {process.env.NEXT_PUBLIC_STRIPE === "true" && t("stripe_update_note")}

{t("sso_will_be_removed_warning", { service: process.env.NEXT_PUBLIC_GOOGLE_ENABLED === "true" ? "Google" : "", })}

{t("old_email")}

{oldEmail}

{t("new_email")}

{newEmail}

{t("password")}

setPassword(e.target.value)} placeholder="••••••••••••••" className="bg-base-200" type="password" autoFocus />
); }