Rev 3187 | Rev 3201 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react'
import { Outlet } from 'react-router-dom'
import { useSelector } from 'react-redux'
import { Container, CssBaseline } from '@mui/material'
import { Chat } from '@components/chat'
import Footer from '@components/footer/Footer'
import Header from '@components/UI/navbar/Header'
import NotificationAlert from '@components/UI/notification/NotificationAlert'
export default function RootLayout() {
const isAuth = useSelector((state) => state.auth.isAuth)
return (
<>
<CssBaseline />
{isAuth && <Header />}
<Container
sx={{
minHeight: 'calc(100vh - 65px - 129px)',
padding: 0,
marginTop: ({ spacing }) => spacing(1)
}}
>
<Outlet />
</Container>
<Chat />
<NotificationAlert />
<Footer />
</>
)
}