mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-29 10:16:32 +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")}
|
||||
onChangeEmail={() => {
|
||||
setEmail(undefined);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -68,6 +68,9 @@ export const RegisterForm = () => {
|
|||
});
|
||||
}}
|
||||
email={getValues("email")}
|
||||
onChangeEmail={() => {
|
||||
setToken(undefined);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,8 @@ export const verifyCode = async (options: { email: string; token: string }) => {
|
|||
export const VerifyCode: React.FunctionComponent<{
|
||||
email: string;
|
||||
onSubmit: (code: string) => Promise<void>;
|
||||
}> = ({ onSubmit, email }) => {
|
||||
onChangeEmail?: () => void;
|
||||
}> = ({ onSubmit, onChangeEmail, email }) => {
|
||||
const { register, handleSubmit, setError, formState } = useForm<{
|
||||
code: string;
|
||||
}>();
|
||||
|
@ -58,11 +59,11 @@ export const VerifyCode: React.FunctionComponent<{
|
|||
components={{
|
||||
b: <strong className="whitespace-nowrap" />,
|
||||
a: (
|
||||
<a
|
||||
<button
|
||||
role="button"
|
||||
className="text-link"
|
||||
href="#"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
onClick={() => {
|
||||
onChangeEmail?.();
|
||||
}}
|
||||
/>
|
||||
),
|
||||
|
|
Loading…
Add table
Reference in a new issue