Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930
  1. 'use client'
  2. import React from 'react'
  3. import cn from 'classnames'
  4. import { useSearchParams } from 'next/navigation'
  5. import Header from '../signin/_header'
  6. import ForgotPasswordForm from './ForgotPasswordForm'
  7. import ChangePasswordForm from '@/app/forgot-password/ChangePasswordForm'
  8. import useDocumentTitle from '@/hooks/use-document-title'
  9. import { useGlobalPublicStore } from '@/context/global-public-context'
  10. const ForgotPassword = () => {
  11. useDocumentTitle('')
  12. const searchParams = useSearchParams()
  13. const token = searchParams.get('token')
  14. const { systemFeatures } = useGlobalPublicStore()
  15. return (
  16. <div className={cn('flex min-h-screen w-full justify-center bg-background-default-burn p-6')}>
  17. <div className={cn('flex w-full shrink-0 flex-col rounded-2xl border border-effects-highlight bg-background-default-subtle')}>
  18. <Header />
  19. {token ? <ChangePasswordForm /> : <ForgotPasswordForm />}
  20. {!systemFeatures.branding.enabled && <div className='px-8 py-6 text-sm font-normal text-text-tertiary'>
  21. © {new Date().getFullYear()} LangGenius, Inc. All rights reserved.
  22. </div>}
  23. </div>
  24. </div>
  25. )
  26. }
  27. export default ForgotPassword