Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2804 | Rev 2963 | 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(({ auth }) => auth)

  return (
    <>
      <CssBaseline />

      {isAuth ? <Header /> : null}

      <Container sx={{ minHeight: '65vh' }}>
        <Outlet />

        {isAuth ? <Chat /> : null}
        <NotificationAlert />
      </Container>

      <Footer />
    </>
  )
}