Footer added (fix CSS)

This commit is contained in:
Harshitha Shetty
2025-03-30 19:30:09 +05:30
parent 9fda8ba883
commit 1b6abd6efe
12 changed files with 100 additions and 0 deletions

View 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;