fixed/components #31

Merged
MaxOvs19 merged 11 commits from fixed/components into main 2024-04-15 21:11:58 +03:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 0860591d28 - Show all commits

View File

@ -1,4 +1,5 @@
import React, { useState } from "react"; import React, { useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import { useFormValidation } from "@hooks/useFormValidation"; import { useFormValidation } from "@hooks/useFormValidation";
import { useNotification } from "@hooks/useNotification"; import { useNotification } from "@hooks/useNotification";
@ -17,6 +18,7 @@ import "./modalRegistration.scss";
export const ModalRegistration = ({ active, setActive }) => { export const ModalRegistration = ({ active, setActive }) => {
const [loader, setLoader] = useState(false); const [loader, setLoader] = useState(false);
const [isPartner, setIsPartner] = useState(false); const [isPartner, setIsPartner] = useState(false);
const navigate = useNavigate();
const fields = { const fields = {
username: "", username: "",
@ -145,6 +147,7 @@ export const ModalRegistration = ({ active, setActive }) => {
onClick={async (e) => { onClick={async (e) => {
e.preventDefault(); e.preventDefault();
await handleSubmit(e); await handleSubmit(e);
navigate("/welcome-page");
}} }}
styles="button-box__submit" styles="button-box__submit"
> >

View File

@ -1,4 +1,5 @@
import React, { useState } from "react"; import React, { useState } from "react";
import { useNavigate } from "react-router";
import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader"; import { AuthHeader } from "@components/Common/AuthHeader/AuthHeader";
import BaseButton from "@components/Common/BaseButton/BaseButton"; import BaseButton from "@components/Common/BaseButton/BaseButton";
@ -12,6 +13,7 @@ import "./welcomePage.scss";
export const WelcomePage = () => { export const WelcomePage = () => {
const [loader, setLoader] = useState(false); const [loader, setLoader] = useState(false);
const navigate = useNavigate();
return ( return (
<div className="welcome-page"> <div className="welcome-page">
@ -39,6 +41,7 @@ export const WelcomePage = () => {
<BaseButton <BaseButton
onClick={() => { onClick={() => {
setLoader(true); setLoader(true);
navigate("/profile");
}} }}
styles="button-box__submit" styles="button-box__submit"
> >