This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree 2 files changed +6
-9
lines changed
src/theme/NavbarItem/LocaleDropdownNavbarItem
2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ const config = {
24
24
// to replace "en" with "zh-Hans".
25
25
i18n : {
26
26
defaultLocale : 'en' ,
27
- locales : [ 'en' , 'pr ' ] ,
27
+ locales : [ 'en' , 'es ' ] ,
28
28
localeConfigs : {
29
29
en : {
30
30
label : 'English' ,
31
31
} ,
32
- pr : {
33
- label : 'Portuguese ' ,
32
+ es : {
33
+ label : 'Español ' ,
34
34
} ,
35
35
} ,
36
36
} ,
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ import { useLocation } from '@docusaurus/router';
5
5
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem' ;
6
6
import type { LinkLikeNavbarItemProps } from '@theme/NavbarItem' ;
7
7
import type { Props } from '@theme/NavbarItem/LocaleDropdownNavbarItem' ;
8
+ import classnames from 'classnames' ;
8
9
9
10
export default function LocaleDropdownNavbarItem ( {
10
- // mobile,
11
11
dropdownItemsBefore,
12
12
dropdownItemsAfter,
13
13
...props
@@ -31,9 +31,7 @@ export default function LocaleDropdownNavbarItem({
31
31
to,
32
32
target : '_self' ,
33
33
autoAddBaseUrl : false ,
34
- className :
35
- // eslint-disable-next-line no-nested-ternary
36
- locale === currentLocale ? 'dropdown__link--active' : '' ,
34
+ className : classnames ( { 'dropdown__link--active' : locale === currentLocale } ) ,
37
35
} ;
38
36
} ) ;
39
37
@@ -44,8 +42,7 @@ export default function LocaleDropdownNavbarItem({
44
42
return (
45
43
< DropdownNavbarItem
46
44
{ ...props }
47
- // mobile={mobile}
48
- label = { < > { dropdownLabel === 'English' ? 'EN' : 'PT' } </ > }
45
+ label = { < > { dropdownLabel === 'English' ? 'EN' : 'ES' } </ > }
49
46
items = { items }
50
47
/>
51
48
) ;
You can’t perform that action at this time.
0 commit comments