mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 08:42:12 +10:00
chore: refactor
This commit is contained in:
@ -18,7 +18,7 @@ export default function UnverifiedAccount() {
|
||||
const searchParams = useSearchParams();
|
||||
const { toast } = useToast();
|
||||
|
||||
const encryptedEmail = searchParams?.get('t') ?? ''; // TODO: choose a better name instead of t
|
||||
const encryptedEmail = searchParams?.get('token') ?? '';
|
||||
|
||||
const { mutateAsync: sendConfirmationEmail } = trpc.profile.sendConfirmationEmail.useMutation();
|
||||
|
||||
@ -26,7 +26,7 @@ export default function UnverifiedAccount() {
|
||||
try {
|
||||
setIsButtonDisabled(true);
|
||||
|
||||
await sendConfirmationEmail({ email: encryptedEmail });
|
||||
await sendConfirmationEmail({ encryptedEmail });
|
||||
|
||||
toast({
|
||||
title: 'Success',
|
||||
|
||||
@ -134,7 +134,7 @@ export const SignInForm = ({ className, isGoogleSSOEnabled }: SignInFormProps) =
|
||||
if (result.error === ErrorCode.UNVERIFIED_EMAIL) {
|
||||
const encryptedEmail = await encryptSecondaryData({ data: email });
|
||||
|
||||
router.push(`/unverified-account?t=${encryptedEmail}`);
|
||||
router.push(`/unverified-account?token=${encryptedEmail}`);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ export const SignUpForm = ({ className, isGoogleSSOEnabled }: SignUpFormProps) =
|
||||
|
||||
const encryptedEmail = await encryptSecondaryData({ data: email });
|
||||
|
||||
router.push(`/unverified-account?t=${encryptedEmail}`);
|
||||
router.push(`/unverified-account?token=${encryptedEmail}`);
|
||||
|
||||
toast({
|
||||
title: 'Registration Successful',
|
||||
|
||||
Reference in New Issue
Block a user