v0.1
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,3 +25,4 @@ dist-ssr
|
|||||||
.yarn
|
.yarn
|
||||||
yarn.lock
|
yarn.lock
|
||||||
.yarnrc.yml
|
.yarnrc.yml
|
||||||
|
.env
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
import {FC} from "react";
|
import {FC} from "react";
|
||||||
import {useNavigate} from "@tanstack/react-router";
|
import {useNavigate} from "@tanstack/react-router";
|
||||||
|
import {useSelector} from "react-redux";
|
||||||
|
import {RootState} from "../../redux/store.ts";
|
||||||
|
|
||||||
const MainPage: FC = () => {
|
const MainPage: FC = () => {
|
||||||
|
const authState = useSelector((state: RootState) => state.auth);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
navigate({to: '/leads'});
|
if (authState.isAuthorized) {
|
||||||
|
navigate({to: "/leads"})
|
||||||
|
return (<></>)
|
||||||
|
}
|
||||||
return (<>
|
return (<>
|
||||||
|
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user