apps/web: fix Form onSubmit

This commit is contained in:
vchikalkin 2024-05-28 12:09:38 +03:00
parent 001c83e902
commit 7a913a23f0
2 changed files with 4 additions and 3 deletions

View File

@ -127,8 +127,8 @@ export const Form = {
if (step === 'telegram') {
return (
<BaseForm onSubmit={(data) => handleLogin(data)}>
<button type="button" className={styles['button-telegram']}>
<BaseForm onSubmit={() => handleTelegramLogin()}>
<button type="submit" className={styles['button-telegram']}>
<Image
className={styles['button-telegram-icon']}
src={TelegramIcon}
@ -143,7 +143,7 @@ export const Form = {
}
return (
<BaseForm onSubmit={() => handleTelegramLogin()}>
<BaseForm onSubmit={(data) => handleLogin(data)}>
<button className={styles['button-submit']} type="submit">
Войти
</button>

View File

@ -21,6 +21,7 @@ const reducer = (state: State, action: Action): State => {
return {
...state,
step: action.payload.step,
user: action.payload.user || state.user,
};
return state;