diff --git a/src/components/Modal/ModalRegistration/ModalRegistration.jsx b/src/components/Modal/ModalRegistration/ModalRegistration.jsx index 84e5a1bc..fd3129d5 100644 --- a/src/components/Modal/ModalRegistration/ModalRegistration.jsx +++ b/src/components/Modal/ModalRegistration/ModalRegistration.jsx @@ -1,4 +1,5 @@ import React, { useState } from "react"; +import { Link, useNavigate } from "react-router-dom"; import { useFormValidation } from "@hooks/useFormValidation"; import { useNotification } from "@hooks/useNotification"; @@ -17,6 +18,7 @@ import "./modalRegistration.scss"; export const ModalRegistration = ({ active, setActive }) => { const [loader, setLoader] = useState(false); const [isPartner, setIsPartner] = useState(false); + const navigate = useNavigate(); const fields = { username: "", @@ -145,6 +147,7 @@ export const ModalRegistration = ({ active, setActive }) => { onClick={async (e) => { e.preventDefault(); await handleSubmit(e); + navigate("/welcome-page"); }} styles="button-box__submit" > diff --git a/src/pages/WelcomePage/WelcomePage.jsx b/src/pages/WelcomePage/WelcomePage.jsx index 1cfaf973..93647d58 100644 --- a/src/pages/WelcomePage/WelcomePage.jsx +++ b/src/pages/WelcomePage/WelcomePage.jsx @@ -1,4 +1,5 @@ import React, { useState } from "react"; +import { useNavigate } from "react-router"; import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader"; import BaseButton from "@components/Common/BaseButton/BaseButton"; @@ -12,6 +13,7 @@ import "./welcomePage.scss"; export const WelcomePage = () => { const [loader, setLoader] = useState(false); + const navigate = useNavigate(); return (
@@ -39,6 +41,7 @@ export const WelcomePage = () => { { setLoader(true); + navigate("/profile"); }} styles="button-box__submit" >