linting-fix
This commit is contained in:
parent
28f52ba745
commit
d1fbc48775
|
@ -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() }}>
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user