This commit is contained in:
2024-04-28 06:15:04 +03:00
parent c72187f75d
commit ae9dc1f9af
2 changed files with 8 additions and 1 deletions

1
.gitignore vendored
View File

@@ -25,3 +25,4 @@ dist-ssr
.yarn
yarn.lock
.yarnrc.yml
.env

View File

@@ -1,9 +1,15 @@
import {FC} from "react";
import {useNavigate} 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();
navigate({to: '/leads'});
if (authState.isAuthorized) {
navigate({to: "/leads"})
return (<></>)
}
return (<>
</>