mirror of
https://github.com/beilunyang/moemail.git
synced 2026-09-07 08:16:37 +08:00
feat: add new content pages
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"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 />
|
||||
}
|
||||
Reference in New Issue
Block a user