linting-fix

This commit is contained in:
tonyrewin 2022-11-13 12:32:25 +03:00
parent 28f52ba745
commit d1fbc48775
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ export default (props: ArticleListProps) => {
return ( return (
<Suspense fallback={<div class="article-preview">{t('Loading')}</div>}> <Suspense fallback={<div class="article-preview">{t('Loading')}</div>}>
<For each={[...Array.from({ length: Math.floor(articles().length / 6) }).keys()]}> <For each={[...Array(Math.floor(articles().length / 6)).keys()]}>
{() => <Block6 articles={articles().slice(0, Math.min(6, articles().length))} />} {() => <Block6 articles={articles().slice(0, Math.min(6, articles().length))} />}
</For> </For>
<a href={''} onClick={handleMore} classList={{ disabled: loadingMore() }}> <a href={''} onClick={handleMore} classList={{ disabled: loadingMore() }}>

View File

@ -10,8 +10,8 @@ const [sortedLayoutShouts, setSortedLayoutShouts] = createSignal<Map<LayoutType,
const addLayoutShouts = (layout: LayoutType, shouts: Shout[]) => { const addLayoutShouts = (layout: LayoutType, shouts: Shout[]) => {
setSortedLayoutShouts((prevSorted: Map<LayoutType, Shout[]>) => { setSortedLayoutShouts((prevSorted: Map<LayoutType, Shout[]>) => {
const siblings = prevSorted.get(layout) const siblings = prevSorted.get(layout)
if (Boolean(siblings)) { if (siblings) {
const uniqued = Array.from(new Set([...siblings, ...shouts])) const uniqued = [...new Set([...siblings, ...shouts])]
prevSorted.set(layout, uniqued) prevSorted.set(layout, uniqued)
} }
return prevSorted return prevSorted