Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Active nav link state not showing

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
frontend

Research direction

Start by running the site locally and in staging, then add the requested logging around getUrlPath(currentURL) and compare its result with navLink.href. The work is done when the active navigation link receives the blue styling in staging as it does locally.

Written by the indexing model from the issue text.

Description

Run locally the active nav link renders blue:
image

This doesn't appear to be happening in our staging environment.

function getUrlPath(url) { const parts = url.split("/"); return "/" + parts[parts.length - 1]; }

function renderNavLink(navLink, index) {
    return (
      <a
        href={navLink.href}
        target={navLink.target}
        key={index}
        className={
          getUrlPath(currentURL) === navLink.href
            ? "font-regular text-blue-700"
            : "font-regular text-gray-800 hover:text-blue-700"
        }
      >
        {navLink.linkText}
      </a>
    );
  }

Add console.log to above code to check what getUrlPath is returning on staging

Dominant language
TypeScript
Stars
10
Forks
8
Avg merge
21m
Merged PRs (30d)
6

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from audacity/audacity.github.io

All issues in audacity/audacity.github.io

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.