Active nav link state not showing
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:
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from audacity/audacity.github.io
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
audacity/audacity.github.io#105 · 1 reaction ·
-
Dead links Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Add license Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
No checksum type Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
audacity/audacity.github.io#41 · 1 reaction ·
All issues in audacity/audacity.github.io
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fil-donadoni/tolaria#4409 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
corsairdev/corsair#1764 ·