This commit is contained in:
2024-03-05 04:58:05 +03:00
parent 659d76b694
commit e2962f3be2
11 changed files with 141 additions and 56 deletions

View File

@@ -4,9 +4,11 @@ import {useSelector} from "react-redux";
import {RootState} from "../../redux/store.ts";
import {OpenAPI} from "../../client";
import PageWrapper from "../PageWrapper/PageWrapper.tsx";
import {LoadingOverlay} from "@mantine/core";
const RootPage = () => {
const authState = useSelector((state: RootState) => state.auth);
const uiState = useSelector((state: RootState) => state.ui);
const rewriteLocalStorage = () => {
const jsonData = JSON.stringify(authState);
localStorage.setItem('authState', jsonData);
@@ -21,13 +23,11 @@ const RootPage = () => {
return (
<>
<LoadingOverlay visible={uiState.isLoading}/>
<PageWrapper>
<Outlet/>
</PageWrapper>
</>
)
}