apps/web: Form: show telegram link on step login-success

This commit is contained in:
vchikalkin 2024-07-18 20:32:09 +03:00
parent 40d5771845
commit 67019e3aba

View File

@ -11,7 +11,7 @@ const { TELEGRAM_BOT_URL } = publicRuntimeConfig;
export function BaseForm({ children, onSubmit }: FormProps & PropsWithChildren) {
const { handleSubmit, register } = useForm<FormData>();
const {
state: { error, step, tfa },
state: { error, step },
} = useContext(FormStateContext);
return (
@ -32,7 +32,7 @@ export function BaseForm({ children, onSubmit }: FormProps & PropsWithChildren)
autoComplete="on"
{...register('password', { required: true })}
/>
{tfa ? (
{step === 'login-success' ? (
<a target="_blank" className="info" href={TELEGRAM_BOT_URL} rel="noreferrer">
Открыть чат с ботом
</a>