This commit is contained in:
DomySh
2022-07-22 00:34:57 +02:00
parent 1399d0e22d
commit d8dc5c9f8b
38 changed files with 112 additions and 81 deletions

View File

@@ -1,15 +1,24 @@
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import { Container, Space } from '@mantine/core';
import { AppShell } from '@mantine/core';
import NavBar from './NavBar';
import FooterPage from './Footer';
import HeaderPage from './Header';
import { getmainpath } from '../js/utils';
import { useLocation } from 'react-router-dom';
function MainLayout({ children }:{ children:any }) {
const [opened, setOpened] = useState(false);
const location = useLocation()
useEffect(()=>{
if (location.pathname !== "/"){
sessionStorage.setItem('home_section', getmainpath())
}
},[location.pathname])
return <>
<AppShell