Files
moemail/app/components/layout/conditional-footer.tsx
2026-01-18 14:33:11 +08:00

21 lines
440 B
TypeScript

"use client"
import { usePathname } from "next/navigation"
import { Footer } from "./footer"
export function ConditionalFooter() {
const pathname = usePathname()
// Hide footer on /moe and /profile paths
const hideFooterPaths = ["/moe", "/profile"]
const shouldHideFooter = hideFooterPaths.some(path =>
pathname.includes(path)
)
if (shouldHideFooter) {
return null
}
return <Footer />
}