forked from CSI-KJSCE/appointment_to_examiner
Footer added (fix CSS)
This commit is contained in:
24
client/src/Pages/Layout.jsx
Normal file
24
client/src/Pages/Layout.jsx
Normal file
@@ -0,0 +1,24 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user