mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-30 02:36:30 +02:00
🐛 Fix change button not doing anything (#960)
This commit is contained in:
parent
381520be04
commit
fc6c1d54cd
3 changed files with 12 additions and 5 deletions
|
@ -69,6 +69,9 @@ export function LoginForm({ oidcConfig }: { oidcConfig?: { name: string } }) {
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
email={getValues("email")}
|
email={getValues("email")}
|
||||||
|
onChangeEmail={() => {
|
||||||
|
setEmail(undefined);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,9 @@ export const RegisterForm = () => {
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
email={getValues("email")}
|
email={getValues("email")}
|
||||||
|
onChangeEmail={() => {
|
||||||
|
setToken(undefined);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,8 @@ 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>;
|
||||||
}> = ({ onSubmit, email }) => {
|
onChangeEmail?: () => void;
|
||||||
|
}> = ({ onSubmit, onChangeEmail, email }) => {
|
||||||
const { register, handleSubmit, setError, formState } = useForm<{
|
const { register, handleSubmit, setError, formState } = useForm<{
|
||||||
code: string;
|
code: string;
|
||||||
}>();
|
}>();
|
||||||
|
@ -58,11 +59,11 @@ export const VerifyCode: React.FunctionComponent<{
|
||||||
components={{
|
components={{
|
||||||
b: <strong className="whitespace-nowrap" />,
|
b: <strong className="whitespace-nowrap" />,
|
||||||
a: (
|
a: (
|
||||||
<a
|
<button
|
||||||
|
role="button"
|
||||||
className="text-link"
|
className="text-link"
|
||||||
href="#"
|
onClick={() => {
|
||||||
onClick={(e) => {
|
onChangeEmail?.();
|
||||||
e.preventDefault();
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Reference in a new issue