2
2
* Copyright (c) Facebook, Inc. and its affiliates.
3
3
*/
4
4
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' ;
5
10
import {
6
- useState ,
7
- useRef ,
11
+ Suspense ,
12
+ startTransition ,
8
13
useCallback ,
9
14
useEffect ,
10
- startTransition ,
11
- Suspense ,
15
+ useRef ,
16
+ useState ,
12
17
} 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' ;
18
18
19
19
import { IconClose } from 'components/Icon/IconClose' ;
20
20
import { IconHamburger } from 'components/Icon/IconHamburger' ;
@@ -237,7 +237,7 @@ export default function TopNav({
237
237
< div className = "3xl:flex-1 flex flex-row " >
238
238
< button
239
239
type = "button"
240
- aria-label = "Menu "
240
+ aria-label = "Valikko "
241
241
onClick = { ( ) => setIsOpen ( ! isOpen ) }
242
242
className = { cn (
243
243
'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({
268
268
) }
269
269
onClick = { onOpenSearch } >
270
270
< IconSearch className = "me-3 align-middle text-gray-30 shrink-0 group-betterhover:hover:text-gray-70" />
271
- Search
271
+ Hae
272
272
< span className = "ms-auto hidden sm:flex item-center me-1" >
273
273
< Kbd data-platform = "mac" > ⌘</ Kbd >
274
274
< Kbd data-platform = "win" wide >
@@ -281,25 +281,25 @@ export default function TopNav({
281
281
< div className = "text-base justify-center items-center gap-1.5 flex 3xl:flex-1 flex-row 3xl:justify-end" >
282
282
< div className = "mx-2.5 gap-1.5 hidden lg:flex" >
283
283
< NavItem isActive = { section === 'learn' } url = "/learn" >
284
- Learn
284
+ Opettele
285
285
</ NavItem >
286
286
< NavItem
287
287
isActive = { section === 'reference' }
288
288
url = "/reference/react" >
289
- Reference
289
+ Viite
290
290
</ NavItem >
291
291
< NavItem isActive = { section === 'community' } url = "/community" >
292
- Community
292
+ Yhteisö
293
293
</ NavItem >
294
294
< NavItem isActive = { section === 'blog' } url = "/blog" >
295
- Blog
295
+ Blogi
296
296
</ NavItem >
297
297
</ div >
298
298
< div className = "flex w-full md:hidden" > </ div >
299
299
< div className = "flex items-center -space-x-2.5 xs:space-x-0 " >
300
300
< div className = "flex md:hidden" >
301
301
< button
302
- aria-label = "Search "
302
+ aria-label = "Hae "
303
303
type = "button"
304
304
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"
305
305
onClick = { onOpenSearch } >
@@ -309,7 +309,7 @@ export default function TopNav({
309
309
< div className = "flex dark:hidden" >
310
310
< button
311
311
type = "button"
312
- aria-label = "Use Dark Mode "
312
+ aria-label = "Käytä tummaa tilaa "
313
313
onClick = { ( ) => {
314
314
window . __setPreferredTheme ( 'dark' ) ;
315
315
} }
@@ -320,7 +320,7 @@ export default function TopNav({
320
320
< div className = "hidden dark:flex" >
321
321
< button
322
322
type = "button"
323
- aria-label = "Use Light Mode "
323
+ aria-label = "Käytä vaaleaa tilaa "
324
324
onClick = { ( ) => {
325
325
window . __setPreferredTheme ( 'light' ) ;
326
326
} }
@@ -360,20 +360,20 @@ export default function TopNav({
360
360
< Suspense fallback = { null } >
361
361
< 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" >
362
362
< NavItem isActive = { section === 'learn' } url = "/learn" >
363
- Learn
363
+ Opettele
364
364
</ NavItem >
365
365
< NavItem
366
366
isActive = { section === 'reference' }
367
367
url = "/reference/react" >
368
- Reference
368
+ Viite
369
369
</ NavItem >
370
370
< NavItem
371
371
isActive = { section === 'community' }
372
372
url = "/community" >
373
- Community
373
+ Yhteisö
374
374
</ NavItem >
375
375
< NavItem isActive = { section === 'blog' } url = "/blog" >
376
- Blog
376
+ Blogi
377
377
</ NavItem >
378
378
</ div >
379
379
< div
0 commit comments