diff --git a/app/root.tsx b/app/root.tsx index 9b1f7a4d..620cea3a 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -6,6 +6,7 @@ import { Outlet, Scripts, ScrollRestoration, + useLocation, } from "@remix-run/react"; import type { ReactNode } from "react"; @@ -19,6 +20,9 @@ export const links: LinksFunction = () => [ ]; export function Layout({ children }: { children: ReactNode }) { + const location = useLocation(); + const pagesWithNoFooter = ["/dashboard/password-settings"]; + const showFooter = !pagesWithNoFooter.includes(location.pathname); return ( @@ -32,7 +36,7 @@ export function Layout({ children }: { children: ReactNode }) {
{children} - + {showFooter && }
diff --git a/app/routes/dashboard.password-settings/route.tsx b/app/routes/dashboard.password-settings/route.tsx index ff8c668b..3928633f 100644 --- a/app/routes/dashboard.password-settings/route.tsx +++ b/app/routes/dashboard.password-settings/route.tsx @@ -1,11 +1,9 @@ import PasswordUpdate from "~/components/dashboard/PasswordUpdate"; import { AdminSideNavBar } from "~/components/SuperAdminSideBar/SuperAdminSideNavBar"; -import Header from "~/components/ui/header"; const DaashboardPasswordSettings = () => { return ( <> -