Skip to content

chrome: navbar home-route check assumes single locale, no basePath #115

Description

@yigitdot

Tracking comment from Gemini's review of #114.

Background

After #114, components/site/Chrome.tsx derives the navbar tone from:

const effectiveActive = pathname === "/" && scrolled ? active : "intro";

The pathname === "/" literal is correct today — the static export ships a single locale and next.config.ts has no basePath. If we ever add either, this check (and any other Chrome.tsx guard that conflates "home" with the literal "/" route) will silently mis-fire and the original #112 symptom returns: the navbar paints in a dark-section tone on what is functionally the home page.

When this matters

Before adding any of:

  • i18n routing (/en/, /de/, …)
  • a basePath in next.config.ts
  • any other prefix-rewriting layer that changes the home pathname

…audit components/site/Chrome.tsx for pathname === "/" and replace it with a routing-aware home check (e.g. strip locale prefix from pathname before comparing, or thread the home route through a config helper).

Out of scope for #114; filed so the assumption is documented and discoverable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions