mirror of
https://github.com/beilunyang/moemail.git
synced 2026-06-11 02:20:11 +08:00
21 lines
440 B
TypeScript
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 />
|
|
}
|