import Footer from "./Footer";
import Navigation from "./Navigation";
import { useRouter } from "next/router";
function CustomLayout({ children }) {
const router = useRouter();
return (
<>
{router.pathname !== "/*" && <Navigation />}
{/* {router.pathname !== "*" && <Navigation />} */}
<main className="main-content">{children}</main>
{router.pathname !== "/*" && <Footer />}
{/* {router.pathname !== "*" && <Footer />} */}
</>
);
}
export default CustomLayout;
It seems like the methods with an asterisk are not functioning properly. Any suggestions on how to fix this issue? Thank you in advance and best regards to everyone! ;-)