import { router, useLocalSearchParams } from 'expo-router' import { CompanyLogo, ControlledField, FeaturedIcon, FormWrapper } from '@/components' import { Button, Center, Display, Spacer, Text } from '@/design-system' import { useEffect, useResetPasswordForm, useTranslation } from '@/hooks' import { usePasswordValidation } from '@/hooks/usePasswordValidation' const navigateToLogin = () => { router.replace('/sign-in') } export const ResetPasswordScreen = () => { const { t } = useTranslation() const { hash } = useLocalSearchParams<{ hash: string }>() const { control, errors, isSubmitting, reset, submit } = useResetPasswordForm() const { isPasswordError, passwordSuggestions, validationFn } = usePasswordValidation() useEffect(() => { if (hash) { reset({ hash }) } }, [hash, reset]) return (
{t('reset_password_screen.set_new_password')} {t('reset_password_screen.welcome_back')} {passwordSuggestions} { if (formValues.password !== inputValue) { return t('form.validation.passwords_does_not_match') } }, }, }} testID="passwordInput" type="password" />
) }