page.tsx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. 'use client'
  2. import React from 'react'
  3. import classNames from 'classnames'
  4. import { useSearchParams } from 'next/navigation'
  5. import Header from '../signin/_header'
  6. import style from '../signin/page.module.css'
  7. import ForgotPasswordForm from './ForgotPasswordForm'
  8. import ChangePasswordForm from '@/app/forgot-password/ChangePasswordForm'
  9. const ForgotPassword = () => {
  10. const searchParams = useSearchParams()
  11. const token = searchParams.get('token')
  12. return (
  13. <div className={classNames(
  14. style.background,
  15. 'flex w-full min-h-screen',
  16. 'p-4 lg:p-8',
  17. 'gap-x-20',
  18. 'justify-center lg:justify-start',
  19. )}>
  20. <div className={
  21. classNames(
  22. 'flex w-full flex-col bg-white shadow rounded-2xl shrink-0',
  23. 'md:w-[608px] space-between',
  24. )
  25. }>
  26. <Header />
  27. {token ? <ChangePasswordForm /> : <ForgotPasswordForm />}
  28. <div className='px-8 py-6 text-sm font-normal text-gray-500'>
  29. © {new Date().getFullYear()} LangGenius, Inc. All rights reserved.
  30. </div>
  31. </div>
  32. </div>
  33. )
  34. }
  35. export default ForgotPassword