This commit is contained in:
2024-07-21 10:58:51 +03:00
parent 54c9ca8908
commit af05b51d1c
188 changed files with 1155 additions and 555 deletions

View File

@@ -1,14 +1,12 @@
import {FC} from "react";
import {useNavigate} from "@tanstack/react-router";
import {Navigate} from "@tanstack/react-router";
import {useSelector} from "react-redux";
import {RootState} from "../../redux/store.ts";
const MainPage: FC = () => {
const authState = useSelector((state: RootState) => state.auth);
const navigate = useNavigate();
if (authState.isAuthorized) {
navigate({to: "/leads"})
return (<></>)
return (<Navigate to={"/leads"}/>)
}
return (<>