index.tsx 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { Link } from '@tanstack/react-router'
  2. import { useTranslation } from 'react-i18next'
  3. import { AuthLayout } from '../auth-layout'
  4. import { OtpForm } from './components/otp-form'
  5. export function Otp() {
  6. const { t } = useTranslation()
  7. return (
  8. <AuthLayout>
  9. <div className='w-full space-y-8'>
  10. <div className='space-y-3'>
  11. <h2 className='text-center text-2xl font-semibold tracking-tight sm:text-left'>
  12. {t('Two-factor Authentication')}
  13. </h2>
  14. <p className='text-muted-foreground text-left text-sm sm:text-base'>
  15. {t('Please enter the authentication code.')}
  16. </p>
  17. <p className='text-muted-foreground text-left text-sm sm:text-base'>
  18. {t('Session expired?')}{' '}
  19. <Link
  20. to='/sign-in'
  21. className='hover:text-primary font-medium underline underline-offset-4'
  22. >
  23. {t('Re-login')}
  24. </Link>
  25. .
  26. </p>
  27. </div>
  28. <OtpForm />
  29. </div>
  30. </AuthLayout>
  31. )
  32. }