Skip to content

Commit 47d04b0

Browse files
committed
Render the solid header on blog.bentobox.world's root page
Navigation switches to "transparent header with white text" when the path is "/" because that's the dark-hero Landing page. On the blog subdomain "/" is BlogList instead, which sits on parchment, so the white-on-parchment header had no contrast. Treat blog.* hosts as non-landing regardless of path.
1 parent 8f71d30 commit 47d04b0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/web/components/Navigation.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ export default function Navigation() {
114114

115115
// The header sits on top of the dark hero on `/` and stays transparent
116116
// until the user scrolls past it. On every other route it's solid paper.
117-
const isLanding = location.pathname === '/';
117+
// The blog subdomain serves BlogList at `/` instead of Landing, so on
118+
// blog.* hosts we always render the solid parchment header.
119+
const onBlogHost =
120+
typeof window !== 'undefined' &&
121+
/^blog\./i.test(window.location.hostname);
122+
const isLanding = !onBlogHost && location.pathname === '/';
118123

119124
useEffect(() => {
120125
if (!isLanding) {

0 commit comments

Comments
 (0)