Skip to content

Pricing link navigates incorrectly from non-home pages #22

@Mahadevan2005

Description

@Mahadevan2005

🐛 Bug Description

The Pricing link in the navbar uses a relative hash anchor (#pricing), which causes incorrect navigation when clicked from pages other than the home page (e.g., /terms, /privacy).

Instead of navigating back to the home page and scrolling to the Pricing section, the hash is appended to the current route.


Steps to Reproduce

  1. Navigate to the home page (/)
  2. Click the Terms link in the navbar (navigates to /terms)
  3. Click the Pricing link in the navbar
  4. Observe the resulting URL

Expected Behavior

  • Clicking Pricing from any page should navigate to: /#pricing
  • The browser should load the home page and scroll to the Pricing section.

Actual Behavior

  • From /terms, the URL becomes: /terms#pricing

  • From /privacy, the URL becomes: /privacy#pricing

  • The page does not navigate to the home page, and the Pricing section is not visible.


🧠 Root Cause

The navbar uses a relative hash anchor, which resolves against the current route instead of the root path.

File: components/navbar.tsx
Lines: 72–74

<Link
href="#pricing"
className="text-xs text-muted-foreground hover:text-foreground transition-colors"
>
Pricing
</Link>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions