(chore) lint
This commit is contained in:
parent
b8ab3e9326
commit
4d8052d042
2 changed files with 11 additions and 5 deletions
|
@ -3,14 +3,17 @@ import { ChoiceLink } from 'shared/components/choice-link.mjs'
|
||||||
import { OkIcon, NoIcon, WarningIcon } from 'shared/components/icons.mjs'
|
import { OkIcon, NoIcon, WarningIcon } from 'shared/components/icons.mjs'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import { capitalize } from 'shared/utils.mjs'
|
import { capitalize } from 'shared/utils.mjs'
|
||||||
|
import Image from 'next/image'
|
||||||
|
|
||||||
export const ns = ['sets']
|
export const ns = ['sets']
|
||||||
|
|
||||||
const Title = ({ set, language }) => (
|
const Title = ({ set, language }) => (
|
||||||
<div className="flex flex-row items-center gap-2">
|
<div className="flex flex-row items-center gap-2">
|
||||||
<img
|
<Image
|
||||||
alt="img"
|
alt="img"
|
||||||
src={set.img}
|
src={set.img || ''}
|
||||||
|
width={100}
|
||||||
|
height={100}
|
||||||
className="shadow mask mask-squircle bg-neutral aspect-square w-12 h-12"
|
className="shadow mask mask-squircle bg-neutral aspect-square w-12 h-12"
|
||||||
/>
|
/>
|
||||||
<span>{set[`name${language ? capitalize(language) : ''}`]}</span>
|
<span>{set[`name${language ? capitalize(language) : ''}`]}</span>
|
||||||
|
@ -58,7 +61,10 @@ export const SetCandidate = ({
|
||||||
// Proper check for required measurements
|
// Proper check for required measurements
|
||||||
if (hasMeasies) {
|
if (hasMeasies) {
|
||||||
for (const m of requiredMeasies) {
|
for (const m of requiredMeasies) {
|
||||||
if (!Object.keys(set.measies).includes(m)) return <SetLacksMeasies {...setProps} />
|
if (!Object.keys(set.measies).includes(m)) {
|
||||||
|
hasMeasies = false
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ export const CuratedSetPicker = ({ design, language, href, clickHandler }) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getCuratedSets()
|
getCuratedSets()
|
||||||
}, [])
|
}, [backend, language])
|
||||||
|
|
||||||
const addFilter = (tag) => {
|
const addFilter = (tag) => {
|
||||||
const newFilter = [...filter, tag]
|
const newFilter = [...filter, tag]
|
||||||
|
@ -136,7 +136,7 @@ export const UserSetPicker = ({ design, t, href, clickHandler }) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getSets()
|
getSets()
|
||||||
}, [])
|
})
|
||||||
|
|
||||||
return Object.keys(sets).length < 1 ? (
|
return Object.keys(sets).length < 1 ? (
|
||||||
<PopoutWrapper tip noP>
|
<PopoutWrapper tip noP>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue