diff --git a/frontend/packages/vkt/src/components/layouts/Header.tsx b/frontend/packages/vkt/src/components/layouts/Header.tsx
index 104fc2b6b..cfaba288d 100644
--- a/frontend/packages/vkt/src/components/layouts/Header.tsx
+++ b/frontend/packages/vkt/src/components/layouts/Header.tsx
@@ -1,12 +1,10 @@
import { AppBar, Toolbar } from '@mui/material';
import { TFunction } from 'i18next';
-import { useState } from 'react';
import { Link, matchPath, useLocation } from 'react-router-dom';
import {
CookieBanner,
LangSelector,
- MobileNavigationMenuContents,
- MobileNavigationMenuToggle,
+ MobileNavigationMenuWithPortal,
NavigationLinks,
OPHClerkLogo,
OPHLogoViewer,
@@ -102,11 +100,7 @@ const PublicNavigationLinks = () => {
);
};
-const PublicMobileNavigationMenu = ({
- closeMenu,
-}: {
- closeMenu: () => void;
-}) => {
+const PublicMobileNavigationMenu = () => {
const translateCommon = useCommonTranslation();
const { pathname } = useLocation();
const { goodAndSatisfactoryLevel } = useAppSelector(featureFlagsSelector);
@@ -117,13 +111,23 @@ const PublicMobileNavigationMenu = ({
translateCommon,
);
+ const portalContainer = document.getElementById('mobile-menu-placeholder');
+
+ if (!portalContainer) {
+ return null;
+ }
+
return (
-