@@ -20,6 +20,7 @@ import AnimatedHamburger from "./AnimatedHamburger";
2020import Logo from "@/icons/logo.svg" ;
2121import MobileNav from "./MobileNav" ;
2222import { MobileSearch , Search } from "@/components/ui/Search" ;
23+ import Focusable from "../Focusable/Focusable" ;
2324
2425type AlgoliaConfig = {
2526 ALGOLIA_APP_ID : string ;
@@ -83,7 +84,7 @@ const Nav = ({
8384 href = { item . href }
8485 target = "_blank"
8586 rel = "noopener noreferrer"
86- className = "nav-button focus-style p-4"
87+ className = "nav-button p-4"
8788 >
8889 { item . name }
8990 </ a >
@@ -135,16 +136,18 @@ const Nav = ({
135136
136137 { session && (
137138 < >
138- < Link
139- to = "/notifications"
140- className = "focus-style relative flex-shrink-0 rounded-md p-2 text-neutral-500 hover:bg-neutral-200 hover:text-neutral-600 dark:text-neutral-400 dark:hover:bg-neutral-900 dark:hover:text-white"
141- >
142- < span className = "sr-only" > View notifications</ span >
143- { hasNotifications && (
144- < div className = "absolute right-2 top-2 h-2 w-2 animate-pulse rounded-full bg-pink-600" />
145- ) }
146- < BellIcon className = "h-6 w-6" aria-hidden = "true" />
147- </ Link >
139+ < Focusable >
140+ < Link
141+ to = "/notifications"
142+ className = "relative flex-shrink-0 rounded-md p-2 text-neutral-500 hover:bg-neutral-200 hover:text-neutral-600 dark:text-neutral-400 dark:hover:bg-neutral-900 dark:hover:text-white"
143+ >
144+ < span className = "sr-only" > View notifications</ span >
145+ { hasNotifications && (
146+ < div className = "absolute right-2 top-2 h-2 w-2 animate-pulse rounded-full bg-pink-600" />
147+ ) }
148+ < BellIcon className = "h-6 w-6" aria-hidden = "true" />
149+ </ Link >
150+ </ Focusable >
148151 < Menu as = "div" className = "relative ml-4" >
149152 < div >
150153 < MenuButton className = "flex rounded-full bg-black text-sm ring-offset-2 focus:outline-none focus:ring-2 focus:ring-pink-600 focus:ring-offset-2 focus:ring-offset-white" >
@@ -204,22 +207,26 @@ const Nav = ({
204207 < MobileSearch algoliaSearchConfig = { algoliaSearchConfig } />
205208 < ThemeToggle />
206209 { session && (
207- < Link
208- to = "/notifications"
209- className = "focus-style relative flex-shrink-0 rounded-md p-2 text-neutral-500 hover:bg-neutral-200 hover:text-neutral-600 dark:text-neutral-400 dark:hover:bg-neutral-900 dark:hover:text-white"
210- >
211- < span className = "sr-only" > View notifications</ span >
212- { hasNotifications && (
213- < div className = "absolute right-1 top-1 h-2 w-2 animate-pulse rounded-full bg-pink-500" />
214- ) }
215- < BellIcon className = "h-6 w-6" aria-hidden = "true" />
216- </ Link >
210+ < Focusable >
211+ < Link
212+ to = "/notifications"
213+ className = "relative flex-shrink-0 rounded-md p-2 text-neutral-500 hover:bg-neutral-200 hover:text-neutral-600 dark:text-neutral-400 dark:hover:bg-neutral-900 dark:hover:text-white"
214+ >
215+ < span className = "sr-only" > View notifications</ span >
216+ { hasNotifications && (
217+ < div className = "absolute right-1 top-1 h-2 w-2 animate-pulse rounded-full bg-pink-500" />
218+ ) }
219+ < BellIcon className = "h-6 w-6" aria-hidden = "true" />
220+ </ Link >
221+ </ Focusable >
217222 ) }
218223 { /* Mobile menu button */ }
219- < DisclosureButton className = "nav-button focus-style group" >
220- < span className = "sr-only" > Open main menu</ span >
221- < AnimatedHamburger open = { open } />
222- </ DisclosureButton >
224+ < Focusable >
225+ < DisclosureButton className = "nav-button group" >
226+ < span className = "sr-only" > Open main menu</ span >
227+ < AnimatedHamburger open = { open } />
228+ </ DisclosureButton >
229+ </ Focusable >
223230 </ div >
224231 </ div >
225232 </ div >
0 commit comments