Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use media queries instead of serverside data for correct nav view
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent bbd49d6 commit ce5d7ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/Navigation.tsx
Expand Up @@ -41,12 +41,10 @@ export default function (props: {
email?: string;
hide?: boolean;
id?: string;
mobile?: string;
permissions?: number;
username?: string;
}) {
let data = { ...props };
const isDesktop = props.mobile === "?0";
const { isOpen, onClose, onOpen } = useDisclosure();

return (
Expand All @@ -56,7 +54,8 @@ export default function (props: {
<Container maxW="container.xl" py={{ base: "6" }}>
<Container
alignItems="center"
display={isDesktop ? "none" : "flex"}
className="mobile-nav"
display="flex"
justifyContent="space-between"
p="0"
w="calc(100vw - 6rem)"
Expand Down Expand Up @@ -84,7 +83,8 @@ export default function (props: {
</Container>
<Flex
alignSelf="center"
display={isDesktop ? "flex" : "none"}
className="desktop-nav"
display="flex"
gap="0.5rem"
justifyContent="space-between"
p="0"
Expand Down

0 comments on commit ce5d7ab

Please sign in to comment.