Skip to content

Commit

Permalink
hide app navbar on promo-page
Browse files Browse the repository at this point in the history
  • Loading branch information
nattvara committed Apr 18, 2024
1 parent 8d35836 commit 09049ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gui/components/navigation/HeaderNavbar/HeaderNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default function HeaderNavbar(props: HeaderNavbarProps) {
const { opened, toggle, courseId } = props;
const { t } = useTranslation("common");
const router = useRouter();
const isPromoPage = router.pathname === "/";

const sessionQuery = useQuery({
queryKey: ["session"],
Expand All @@ -37,6 +38,10 @@ export default function HeaderNavbar(props: HeaderNavbarProps) {
return <></>;
}

if (isPromoPage) {
return <></>;
}

if (!sessionQuery.data.consent) {
return <></>;
}
Expand Down

0 comments on commit 09049ff

Please sign in to comment.