Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🔒️ Remove link to change email (#1156)

Luke Vellab1d3241ca9f9
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index b5368b6ad..886d145d3 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -80,7 +80,6 @@
"validEmail": "Please enter a valid email",
"verificationCodeHelp": "Didn't get the email? Check your spam/junk.",
"verificationCodePlaceholder": "Enter your 6-digit code",
- "verificationCodeSent": "A verification code has been sent to <b>{email}</b> <a>Change</a>",
"verifyYourEmail": "Verify your email",
"startOfWeek": "Start of week",
"weekView": "Week view",
@@ -261,5 +260,6 @@
"advancedSettingsTitle": "Advanced Settings",
"advancedSettingsDescription": "Hide participants, hide scores, require participant email address.",
"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>"
}
diff --git a/apps/web/src/app/[locale]/(auth)/login/login-form.tsx b/apps/web/src/app/[locale]/(auth)/login/login-form.tsx
index d2fa3d73a..652281a91 100644
--- a/apps/web/src/app/[locale]/(auth)/login/login-form.tsx
+++ b/apps/web/src/app/[locale]/(auth)/login/login-form.tsx
@@ -143,9 +143,6 @@ export function LoginForm() {
}
}}
email={getValues("email")}
- onChangeEmail={() => {
- setEmail(undefined);
- }}
/>
);
}
diff --git a/apps/web/src/app/[locale]/(auth)/register/register-page.tsx b/apps/web/src/app/[locale]/(auth)/register/register-page.tsx
index 01fc86ff3..c5e0eace1 100644
--- a/apps/web/src/app/[locale]/(auth)/register/register-page.tsx
+++ b/apps/web/src/app/[locale]/(auth)/register/register-page.tsx
@@ -68,9 +68,6 @@ export const RegisterForm = () => {
});
}}
email={getValues("email")}
- onChangeEmail={() => {
- setToken(undefined);
- }}
/>
);
}
diff --git a/apps/web/src/components/auth/auth-forms.tsx b/apps/web/src/components/auth/auth-forms.tsx
index ea72f5e1a..c9e0f361f 100644
--- a/apps/web/src/components/auth/auth-forms.tsx
+++ b/apps/web/src/components/auth/auth-forms.tsx
@@ -1,4 +1,3 @@
-"use client";
import { Button } from "@rallly/ui/button";
import { Input } from "@rallly/ui/input";
import { Trans, useTranslation } from "next-i18next";
@@ -22,8 +21,7 @@ export const verifyCode = async (options: { email: string; token: string }) => {
export const VerifyCode: React.FunctionComponent<{
email: string;
onSubmit: (code: string) => Promise<void>;
- onChangeEmail?: () => void;
-}> = ({ onSubmit, onChangeEmail, email }) => {
+}> = ({ onSubmit, email }) => {
const { register, handleSubmit, setError, formState } = useForm<{
code: string;
}>();
@@ -54,20 +52,11 @@ export const VerifyCode: React.FunctionComponent<{
<p className="mb-4">
<Trans
t={t}
- i18nKey="verificationCodeSent"
+ i18nKey="verificationCodeSentTo"
+ defaults="We sent a verification code to <b>{{ email }}</b>"
values={{ email }}
components={{
b: <strong className="whitespace-nowrap" />,
- a: (
- <button
- type="button"
- role="button"
- className="text-link"
- onClick={() => {
- onChangeEmail?.();
- }}
- />
- ),
}}
/>
</p>