Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ceo #361

Merged
merged 1 commit into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading