mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-06 09:59:00 +02:00
🔒️ Remove link to change email (#1156)
This commit is contained in:
parent
f7eda38e0a
commit
b1d3241ca9
4 changed files with 5 additions and 22 deletions
|
@ -80,7 +80,6 @@
|
||||||
"validEmail": "Please enter a valid email",
|
"validEmail": "Please enter a valid email",
|
||||||
"verificationCodeHelp": "Didn't get the email? Check your spam/junk.",
|
"verificationCodeHelp": "Didn't get the email? Check your spam/junk.",
|
||||||
"verificationCodePlaceholder": "Enter your 6-digit code",
|
"verificationCodePlaceholder": "Enter your 6-digit code",
|
||||||
"verificationCodeSent": "A verification code has been sent to <b>{email}</b> <a>Change</a>",
|
|
||||||
"verifyYourEmail": "Verify your email",
|
"verifyYourEmail": "Verify your email",
|
||||||
"startOfWeek": "Start of week",
|
"startOfWeek": "Start of week",
|
||||||
"weekView": "Week view",
|
"weekView": "Week view",
|
||||||
|
@ -261,5 +260,6 @@
|
||||||
"advancedSettingsTitle": "Advanced Settings",
|
"advancedSettingsTitle": "Advanced Settings",
|
||||||
"advancedSettingsDescription": "Hide participants, hide scores, require participant email address.",
|
"advancedSettingsDescription": "Hide participants, hide scores, require participant email address.",
|
||||||
"keepPollsIndefinitely": "Keep Polls Indefinitely",
|
"keepPollsIndefinitely": "Keep Polls Indefinitely",
|
||||||
"keepPollsIndefinitelyDescription": "Inactive polls will not be auto-deleted."
|
"keepPollsIndefinitelyDescription": "Inactive polls will not be auto-deleted.",
|
||||||
|
"verificationCodeSentTo": "We sent a verification code to <b>{{ email }}</b>"
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,9 +143,6 @@ export function LoginForm() {
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
email={getValues("email")}
|
email={getValues("email")}
|
||||||
onChangeEmail={() => {
|
|
||||||
setEmail(undefined);
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,9 +68,6 @@ export const RegisterForm = () => {
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
email={getValues("email")}
|
email={getValues("email")}
|
||||||
onChangeEmail={() => {
|
|
||||||
setToken(undefined);
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
"use client";
|
|
||||||
import { Button } from "@rallly/ui/button";
|
import { Button } from "@rallly/ui/button";
|
||||||
import { Input } from "@rallly/ui/input";
|
import { Input } from "@rallly/ui/input";
|
||||||
import { Trans, useTranslation } from "next-i18next";
|
import { Trans, useTranslation } from "next-i18next";
|
||||||
|
@ -22,8 +21,7 @@ export const verifyCode = async (options: { email: string; token: string }) => {
|
||||||
export const VerifyCode: React.FunctionComponent<{
|
export const VerifyCode: React.FunctionComponent<{
|
||||||
email: string;
|
email: string;
|
||||||
onSubmit: (code: string) => Promise<void>;
|
onSubmit: (code: string) => Promise<void>;
|
||||||
onChangeEmail?: () => void;
|
}> = ({ onSubmit, email }) => {
|
||||||
}> = ({ onSubmit, onChangeEmail, email }) => {
|
|
||||||
const { register, handleSubmit, setError, formState } = useForm<{
|
const { register, handleSubmit, setError, formState } = useForm<{
|
||||||
code: string;
|
code: string;
|
||||||
}>();
|
}>();
|
||||||
|
@ -54,20 +52,11 @@ export const VerifyCode: React.FunctionComponent<{
|
||||||
<p className="mb-4">
|
<p className="mb-4">
|
||||||
<Trans
|
<Trans
|
||||||
t={t}
|
t={t}
|
||||||
i18nKey="verificationCodeSent"
|
i18nKey="verificationCodeSentTo"
|
||||||
|
defaults="We sent a verification code to <b>{{ email }}</b>"
|
||||||
values={{ email }}
|
values={{ email }}
|
||||||
components={{
|
components={{
|
||||||
b: <strong className="whitespace-nowrap" />,
|
b: <strong className="whitespace-nowrap" />,
|
||||||
a: (
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
role="button"
|
|
||||||
className="text-link"
|
|
||||||
onClick={() => {
|
|
||||||
onChangeEmail?.();
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue