front-hub/src/components/NavbarLanding/Navbar.tsx

16 lines
474 B
TypeScript
Raw Normal View History

2023-11-05 23:33:40 +00:00
import { useMediaQuery, useTheme } from "@mui/material"
import NavbarCollapsed from "./NavbarCollapsed"
import NavbarFull from "./NavbarFull"
2023-07-31 21:20:17 +00:00
interface Props {
isCollapsed?: boolean;
isLoggedIn: boolean;
}
export default function Navbar({ isLoggedIn, isCollapsed = false }: Props) {
2023-11-05 23:33:40 +00:00
const theme = useTheme()
const upMd = useMediaQuery(theme.breakpoints.up("md"))
2023-07-31 21:20:17 +00:00
2023-11-05 23:33:40 +00:00
return upMd ? <NavbarFull isLoggedIn={isLoggedIn} /> : <NavbarCollapsed isLoggedIn={isLoggedIn} />
2023-07-31 21:20:17 +00:00
}