Load more fix

This commit is contained in:
ilya-bkv 2024-03-29 16:53:26 +03:00
parent ce0c2c0f0a
commit 5e5693332c

View File

@ -37,7 +37,7 @@ export const Expo = (props: Props) => {
const { t } = useLocalize()
const { sortedArticles } = useArticlesStore({
shouts: props.shouts || [],
shouts: isLoaded() ? props.shouts : [],
layout: props.layout,
})
@ -228,7 +228,7 @@ export const Expo = (props: Props) => {
<Show when={randomTopArticles()?.length > 0} keyed={true}>
<ArticleCardSwiper title={t('Favorite')} slides={randomTopArticles()} />
</Show>
<For each={sortedArticles().slice(LOAD_MORE_PAGE_SIZE * 2, PRERENDERED_ARTICLES_COUNT)}>
<For each={sortedArticles().slice(LOAD_MORE_PAGE_SIZE * 2)}>
{(shout) => (
<div class="col-md-6 mt-md-5 col-sm-8 mt-sm-3">
<ArticleCard