Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2803 | Rev 2812 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
2803 stevensc 1
import React from 'react'
2
import { Outlet } from 'react-router-dom'
3
import { useSelector } from 'react-redux'
4
import { Container, CssBaseline } from '@mui/material'
5
 
2804 stevensc 6
import GlobalStyle from '@app/styles/GlobalStyles'
7
 
2803 stevensc 8
import { Chat } from '@components/chat'
9
import Footer from '@components/footer/Footer'
10
import Header from '@components/UI/navbar/Header'
11
import NotificationAlert from '@components/UI/notification/NotificationAlert'
12
 
13
export default function RootLayout() {
14
  const { isAuth } = useSelector(({ auth }) => auth)
15
 
16
  return (
17
    <>
18
      <CssBaseline />
2804 stevensc 19
      <GlobalStyle isAuth={isAuth} />
2803 stevensc 20
 
2804 stevensc 21
      {isAuth ? <Header /> : null}
2803 stevensc 22
 
23
      <Container sx={{ minHeight: '65vh' }}>
24
        <Outlet />
25
 
26
        {isAuth ? <Chat /> : null}
27
        <NotificationAlert />
28
      </Container>
29
 
30
      <Footer />
31
    </>
32
  )
33
}