Skip to content

Commit 5295c13

Browse files
james-crossJames-Cross
andauthored
fix: adjust navigation links and improve location dropdown positioning (#26)
Co-authored-by: James-Cross <james@streetsupport.net>
1 parent 8c14f7d commit 5295c13

File tree

2 files changed

+8
-80
lines changed

2 files changed

+8
-80
lines changed

src/components/Nav/Nav.tsx

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/components/partials/Nav.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ export default function Nav() {
5555

5656
<div className="hidden md:flex space-x-6 items-center">
5757
<Link href="/find-help" className="text-neutral-800 hover:text-blue-600">Find Help</Link>
58-
<Link href="/about" className="text-neutral-800 hover:text-blue-600">About</Link>
59-
<Link href="/contact" className="text-neutral-800 hover:text-blue-600">Contact</Link>
6058

6159
<div
6260
className="relative"
@@ -68,7 +66,7 @@ export default function Nav() {
6866
</button>
6967

7068
{isLocationsOpen && (
71-
<div className="absolute z-50 mt-2 w-[600px] bg-white border border-neutral-200 rounded shadow-md p-4">
69+
<div className="absolute left-1/2 -translate-x-1/2 z-50 mt-2 w-[600px] bg-white border border-neutral-200 rounded shadow-md p-4">
7270
<ul className="columns-1 sm:columns-2 md:columns-3 gap-4 space-y-1">
7371
{locations
7472
.sort((a, b) => a.name.localeCompare(b.name))
@@ -86,21 +84,22 @@ export default function Nav() {
8684
</div>
8785
)}
8886
</div>
87+
88+
<Link href="/about" className="text-neutral-800 hover:text-blue-600">About</Link>
89+
<Link href="/contact" className="text-neutral-800 hover:text-blue-600">Contact</Link>
8990
</div>
9091
</div>
9192
</div>
9293

9394
{menuOpen && (
9495
<div className="md:hidden px-4 pb-4 space-y-2">
9596
<Link href="/find-help" className="block text-neutral-800 hover:text-blue-600">Find Help</Link>
96-
<Link href="/about" className="block text-neutral-800 hover:text-blue-600">About</Link>
97-
<Link href="/contact" className="block text-neutral-800 hover:text-blue-600">Contact</Link>
9897

9998
<button
10099
onClick={() => setMobileLocationsOpen(prev => !prev)}
101100
className="w-full text-left text-neutral-800 hover:text-blue-600 text-sm font-semibold mt-2"
102101
>
103-
{mobileLocationsOpen ? 'Locations' : 'Locations'}
102+
Locations
104103
</button>
105104

106105
{mobileLocationsOpen && (
@@ -119,6 +118,9 @@ export default function Nav() {
119118
))}
120119
</ul>
121120
)}
121+
122+
<Link href="/about" className="block text-neutral-800 hover:text-blue-600">About</Link>
123+
<Link href="/contact" className="block text-neutral-800 hover:text-blue-600">Contact</Link>
122124
</div>
123125
)}
124126
</nav>

0 commit comments

Comments
 (0)