All files / layouts/BasicLayout BasicLayout.js

100% Statements 4/4
100% Branches 0/0
100% Functions 1/1
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27              347x 347x   347x   347x                            
import { Container } from "react-bootstrap";
import Footer from "main/components/Nav/Footer";
import AppNavbar from "main/components/Nav/AppNavbar";
import { useCurrentUser, useLogout } from "main/utils/currentUser";
import { useSystemInfo } from "main/utils/systemInfo";
 
export default function BasicLayout({ children }) {
  const { data: currentUser } = useCurrentUser();
  const { data: systemInfo } = useSystemInfo();
 
  const doLogout = useLogout().mutate;
 
  return (
    <div className="d-flex flex-column min-vh-100">
      <AppNavbar
        currentUser={currentUser}
        systemInfo={systemInfo}
        doLogout={doLogout}
      />
      <Container expand="xl" className="pt-4 flex-grow-1">
        {children}
      </Container>
      <Footer systemInfo={systemInfo} />
    </div>
  );
}