Skip to content

Commit

Permalink
Fix ceo (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic16x authored Nov 30, 2024
1 parent 066bc57 commit 5eecc08
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "interslavic",
"version": "1.25.1",
"version": "1.25.2",
"description": "Interslavic Dictionary",
"license": "MIT",
"author": {
Expand Down
1 change: 1 addition & 0 deletions src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ const MenuItem = ({
className={classNames('menu-item', { active, 'badge': hasBadge })}
onClick={onClick}
data-sub-title={subTitle}
href={`/${value}`}
>
{t(title)}
</a>
Expand Down
2 changes: 2 additions & 0 deletions src/components/LangSelector/LangSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const LangPart =
<Selector
testId="lang-selector"
className="lang-selector__another"
label={dir}
hideLabel
options={options}
value={lang}
onSelect={(value: string) => {
Expand Down
6 changes: 6 additions & 0 deletions src/components/Selector/Selector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
color: var(--dark);
white-space: nowrap;

&.hide-label {
label {
display: none;
}
}

&__title {
font-size: 18px;
}
Expand Down
5 changes: 3 additions & 2 deletions src/components/Selector/Selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ interface ISelectorProps {
value?: string;
label?: string;
testId?: string;
hideLabel?: boolean;
}

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

return (
<div className={classNames('selector', className)}>
<div className={classNames('selector', className, { 'hide-label': hideLabel })}>
{label && <label className="selector__title" htmlFor={id}>{label}</label>}
<select
data-testid={testId}
Expand Down
2 changes: 1 addition & 1 deletion src/services/dictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ class DictionaryClass {
filterPartOfSpeech = [[posFilter]]
}

const distMap = new WeakMap()
const distMap = new Map()
const results = this.getWordList()
.filter((item) => {
const word = this.getField(item, lang)
Expand Down

0 comments on commit 5eecc08

Please sign in to comment.