diff --git a/src/pages/LoginPage.tsx b/src/pages/LoginPage.tsx index 4619494..aeac2fc 100644 --- a/src/pages/LoginPage.tsx +++ b/src/pages/LoginPage.tsx @@ -3,7 +3,6 @@ import { useState } from 'react'; import { yupResolver } from '@hookform/resolvers/yup'; import { TextFieldType } from '@material/web/textfield/outlined-text-field'; import { useForm } from 'react-hook-form'; -import { Link } from 'react-router-dom'; import { toast } from 'react-toastify'; import PassVisibilityIcon from '@/components/loginReg/PassVisibilityIcon'; @@ -16,7 +15,10 @@ import notationLocalizer from '@/shared/helpers/notationLocalizer'; import switchPassType from '@/shared/helpers/switchPassType'; import { ErrorType, TextInputProps } from '@/shared/types'; import OutlinedTextField from '@/shared/ui/OutlinedTextField'; +import Footer from '@components/Footer/Footer'; import SubmitBtn from '@components/loginReg/SubmitBtn'; +import AnimatedLink from '@pages/WelcomePage/ui/AnimatedLink'; +import useScrollbar from '@shared/lib/hooks/useScrollbar'; export default function LoginPage() { const [passType, setPassType] = useState('password'); @@ -33,6 +35,7 @@ export default function LoginPage() { resolver: yupResolver(loginValidationSchema), mode: 'all', }); + const containerRef = useScrollbar(); async function onSubmit({ email, password }: { email: string; password: string }) { try { @@ -53,14 +56,31 @@ export default function LoginPage() { } return ( -
-
-

{title}

-

{subtitle}

+
+
+

+ {title} +

+

+ {subtitle} +

- + {btnTitle}

{linkClue}{' '} - + {linkTitle} - +

+
); } diff --git a/src/pages/SignUpPage.tsx b/src/pages/SignUpPage.tsx index 0cef0ad..12d7609 100644 --- a/src/pages/SignUpPage.tsx +++ b/src/pages/SignUpPage.tsx @@ -3,7 +3,6 @@ import { useState } from 'react'; import { yupResolver } from '@hookform/resolvers/yup'; import { TextFieldType } from '@material/web/textfield/outlined-text-field'; import { useForm } from 'react-hook-form'; -import { Link } from 'react-router-dom'; import { toast } from 'react-toastify'; import PassVisibilityIcon from '@/components/loginReg/PassVisibilityIcon'; @@ -16,7 +15,10 @@ import notationLocalizer from '@/shared/helpers/notationLocalizer'; import switchPassType from '@/shared/helpers/switchPassType'; import { ErrorType, TextInputProps } from '@/shared/types'; import OutlinedTextField from '@/shared/ui/OutlinedTextField'; +import Footer from '@components/Footer/Footer'; import SubmitBtn from '@components/loginReg/SubmitBtn'; +import AnimatedLink from '@pages/WelcomePage/ui/AnimatedLink'; +import useScrollbar from '@shared/lib/hooks/useScrollbar'; export default function SignUpPage() { const [passType, setPassType] = useState('password'); @@ -34,6 +36,7 @@ export default function SignUpPage() { resolver: yupResolver(regValidationSchema), mode: 'all', }); + const containerRef = useScrollbar(); async function onSubmit({ email, password }: { email: string; password: string }) { try { @@ -50,13 +53,19 @@ export default function SignUpPage() { } return ( -
-
+
+

{title}

{subtitle}

- + {btnTitle}

{linkClue}{' '} - + {linkTitle} - +

+
); }