upload mission

This commit is contained in:
Виталий Лавшонок
2025-11-02 13:15:12 +03:00
parent 99018537c5
commit 59f89d5113
18 changed files with 312 additions and 115 deletions

View File

@@ -4,7 +4,7 @@ import { Input } from "../../../components/input/Input";
import { useAppDispatch, useAppSelector } from "../../../redux/hooks";
import { Link, useNavigate } from "react-router-dom";
import { loginUser } from "../../../redux/slices/auth";
import { cn } from "../../../lib/cn";
// import { cn } from "../../../lib/cn";
import { setMenuActivePage } from "../../../redux/slices/store";
import { Balloon } from "../../../assets/icons/auth";
import { SecondaryButton } from "../../../components/button/SecondaryButton";
@@ -18,13 +18,14 @@ const Login = () => {
const [password, setPassword] = useState<string>("");
const [submitClicked, setSubmitClicked] = useState<boolean>(false);
const { status, error, jwt } = useAppSelector((state) => state.auth);
const { status, jwt } = useAppSelector((state) => state.auth);
const [err, setErr] = useState<string>("");
// const [err, setErr] = useState<string>("");
// После успешного логина
useEffect(() => {
console.log(submitClicked);
dispatch(setMenuActivePage("account"))
}, []);

View File

@@ -4,7 +4,7 @@ import { Input } from "../../../components/input/Input";
import { useAppDispatch, useAppSelector } from "../../../redux/hooks";
import { useNavigate } from "react-router-dom";
import { registerUser } from "../../../redux/slices/auth";
import { cn } from "../../../lib/cn";
// import { cn } from "../../../lib/cn";
import { setMenuActivePage } from "../../../redux/slices/store";
import { Balloon } from "../../../assets/icons/auth";
import { Link } from "react-router-dom";
@@ -23,11 +23,12 @@ const Register = () => {
const [confirmPassword, setConfirmPassword] = useState<string>("");
const [submitClicked, setSubmitClicked] = useState<boolean>(false);
const { status, error, jwt } = useAppSelector((state) => state.auth);
const { status, jwt } = useAppSelector((state) => state.auth);
// После успешной регистрации — переход в систему
useEffect(() => {
console.log(submitClicked);
dispatch(setMenuActivePage("account"))
}, []);