import React from "react"; import PropType from "prop-types"; import { useLocation } from "react-router-dom"; import Navbar from "../../components/MUI/NavbarComponent"; import { FormProvider } from "../../context/FormContext"; import { SelectionProvider } from "../../context/SelectionContext"; // import AppRoutes from "../../AppRoutes"; const urls = [ "/", "/login", "/forgot-password", "/reset-password", "/forgot-password-confirmation", "/error-page", ]; const MainContainer = ({ children }) => { const { pathname } = useLocation(); return urls.includes(pathname) ? (
{children}
) : pathname === "/register" ? (
{children}
) : pathname === "/selectionFlow" ? (
{children}
) : (
{children}
); }; MainContainer.propTypes = { children: PropType.any, }; export default MainContainer;