22 * Copyright (c) Facebook, Inc. and its affiliates.
33 */
44
5+ import { disableBodyScroll , enableBodyScroll } from 'body-scroll-lock' ;
6+ import cn from 'classnames' ;
7+ import NextLink from 'next/link' ;
8+ import { useRouter } from 'next/router' ;
9+ import * as React from 'react' ;
510import {
6- useState ,
7- useRef ,
11+ Suspense ,
12+ startTransition ,
813 useCallback ,
914 useEffect ,
10- startTransition ,
11- Suspense ,
15+ useRef ,
16+ useState ,
1217} from 'react' ;
13- import * as React from 'react' ;
14- import cn from 'classnames' ;
15- import NextLink from 'next/link' ;
16- import { useRouter } from 'next/router' ;
17- import { disableBodyScroll , enableBodyScroll } from 'body-scroll-lock' ;
1818
1919import { IconClose } from 'components/Icon/IconClose' ;
2020import { IconHamburger } from 'components/Icon/IconHamburger' ;
@@ -237,7 +237,7 @@ export default function TopNav({
237237 < div className = "3xl:flex-1 flex flex-row " >
238238 < button
239239 type = "button"
240- aria-label = "Menu "
240+ aria-label = "Valikko "
241241 onClick = { ( ) => setIsOpen ( ! isOpen ) }
242242 className = { cn (
243243 'active:scale-95 transition-transform flex lg:hidden w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link' ,
@@ -268,7 +268,7 @@ export default function TopNav({
268268 ) }
269269 onClick = { onOpenSearch } >
270270 < IconSearch className = "me-3 align-middle text-gray-30 shrink-0 group-betterhover:hover:text-gray-70" />
271- Search
271+ Hae
272272 < span className = "ms-auto hidden sm:flex item-center me-1" >
273273 < Kbd data-platform = "mac" > ⌘</ Kbd >
274274 < Kbd data-platform = "win" wide >
@@ -281,25 +281,25 @@ export default function TopNav({
281281 < div className = "text-base justify-center items-center gap-1.5 flex 3xl:flex-1 flex-row 3xl:justify-end" >
282282 < div className = "mx-2.5 gap-1.5 hidden lg:flex" >
283283 < NavItem isActive = { section === 'learn' } url = "/learn" >
284- Learn
284+ Opettele
285285 </ NavItem >
286286 < NavItem
287287 isActive = { section === 'reference' }
288288 url = "/reference/react" >
289- Reference
289+ Viite
290290 </ NavItem >
291291 < NavItem isActive = { section === 'community' } url = "/community" >
292- Community
292+ Yhteisö
293293 </ NavItem >
294294 < NavItem isActive = { section === 'blog' } url = "/blog" >
295- Blog
295+ Blogi
296296 </ NavItem >
297297 </ div >
298298 < div className = "flex w-full md:hidden" > </ div >
299299 < div className = "flex items-center -space-x-2.5 xs:space-x-0 " >
300300 < div className = "flex md:hidden" >
301301 < button
302- aria-label = "Search "
302+ aria-label = "Hae "
303303 type = "button"
304304 className = "active:scale-95 transition-transform flex md:hidden w-12 h-12 rounded-full items-center justify-center hover:bg-secondary-button hover:dark:bg-secondary-button-dark outline-link"
305305 onClick = { onOpenSearch } >
@@ -309,7 +309,7 @@ export default function TopNav({
309309 < div className = "flex dark:hidden" >
310310 < button
311311 type = "button"
312- aria-label = "Use Dark Mode "
312+ aria-label = "Käytä tummaa tilaa "
313313 onClick = { ( ) => {
314314 window . __setPreferredTheme ( 'dark' ) ;
315315 } }
@@ -320,7 +320,7 @@ export default function TopNav({
320320 < div className = "hidden dark:flex" >
321321 < button
322322 type = "button"
323- aria-label = "Use Light Mode "
323+ aria-label = "Käytä vaaleaa tilaa "
324324 onClick = { ( ) => {
325325 window . __setPreferredTheme ( 'light' ) ;
326326 } }
@@ -360,20 +360,20 @@ export default function TopNav({
360360 < Suspense fallback = { null } >
361361 < div className = "ps-3 xs:ps-5 xs:gap-0.5 xs:text-base overflow-x-auto flex flex-row lg:hidden text-base font-bold text-secondary dark:text-secondary-dark" >
362362 < NavItem isActive = { section === 'learn' } url = "/learn" >
363- Learn
363+ Opettele
364364 </ NavItem >
365365 < NavItem
366366 isActive = { section === 'reference' }
367367 url = "/reference/react" >
368- Reference
368+ Viite
369369 </ NavItem >
370370 < NavItem
371371 isActive = { section === 'community' }
372372 url = "/community" >
373- Community
373+ Yhteisö
374374 </ NavItem >
375375 < NavItem isActive = { section === 'blog' } url = "/blog" >
376- Blog
376+ Blogi
377377 </ NavItem >
378378 </ div >
379379 < div
0 commit comments