Files
appointment_to_examiner/client/src/Pages/Layout.jsx
2025-03-30 19:30:09 +05:30

25 lines
615 B
JavaScript

import React from "react";
import { Outlet, useLocation } from "react-router-dom";
import Navbar from "./Navbar";
import Footer from "./Footer";
const Layout = () => {
const location = useLocation();
// Hide footer on specific pages
const hideFooterPages = ["/", "/ForgetPw", "/ResetPw"];
const shouldHideFooter = hideFooterPages.includes(location.pathname);
return (
<div className="app-container">
<Navbar />
<div className="content">
<Outlet /> {/* Current page renders here */}
</div>
{!shouldHideFooter && <Footer />}
</div>
);
};
export default Layout;