Skip to content

Commit 5eecc08

Browse files
authored
Fix ceo (#361)
1 parent 066bc57 commit 5eecc08

File tree

7 files changed

+16
-6
lines changed

7 files changed

+16
-6
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "interslavic",
3-
"version": "1.25.1",
3+
"version": "1.25.2",
44
"description": "Interslavic Dictionary",
55
"license": "MIT",
66
"author": {

src/components/Header/Header.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ const MenuItem = ({
143143
className={classNames('menu-item', { active, 'badge': hasBadge })}
144144
onClick={onClick}
145145
data-sub-title={subTitle}
146+
href={`/${value}`}
146147
>
147148
{t(title)}
148149
</a>

src/components/LangSelector/LangSelector.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ const LangPart =
4040
<Selector
4141
testId="lang-selector"
4242
className="lang-selector__another"
43+
label={dir}
44+
hideLabel
4345
options={options}
4446
value={lang}
4547
onSelect={(value: string) => {

src/components/Selector/Selector.scss

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
color: var(--dark);
88
white-space: nowrap;
99

10+
&.hide-label {
11+
label {
12+
display: none;
13+
}
14+
}
15+
1016
&__title {
1117
font-size: 18px;
1218
}

src/components/Selector/Selector.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ interface ISelectorProps {
1414
value?: string;
1515
label?: string;
1616
testId?: string;
17+
hideLabel?: boolean;
1718
}
1819

19-
export const Selector = ({ onSelect, options, className, value, label, testId }: ISelectorProps) => {
20+
export const Selector = ({ onSelect, options, className, value, label, testId, hideLabel }: ISelectorProps) => {
2021
const id = label ? label.toLowerCase().replace(/ /, '_') : null
2122

2223
return (
23-
<div className={classNames('selector', className)}>
24+
<div className={classNames('selector', className, { 'hide-label': hideLabel })}>
2425
{label && <label className="selector__title" htmlFor={id}>{label}</label>}
2526
<select
2627
data-testid={testId}

src/services/dictionary.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ class DictionaryClass {
387387
filterPartOfSpeech = [[posFilter]]
388388
}
389389

390-
const distMap = new WeakMap()
390+
const distMap = new Map()
391391
const results = this.getWordList()
392392
.filter((item) => {
393393
const word = this.getField(item, lang)

0 commit comments

Comments
 (0)