diff --git a/src/components/Views/Home.tsx b/src/components/Views/Home.tsx index 4e4dbce3..5161f75e 100644 --- a/src/components/Views/Home.tsx +++ b/src/components/Views/Home.tsx @@ -64,7 +64,6 @@ export const HomeView = (props: Props) => { limit: CLIENT_LOAD_ARTICLES_COUNT, offset: sortedArticles().length, }) - setIsLoadMoreButtonVisible(hasMore) } diff --git a/src/stores/zine/articles.ts b/src/stores/zine/articles.ts index e517378b..a52abf65 100644 --- a/src/stores/zine/articles.ts +++ b/src/stores/zine/articles.ts @@ -131,9 +131,8 @@ export const loadShout = async (slug: string): Promise => { export const loadShouts = async ( options: LoadShoutsOptions, ): Promise<{ hasMore: boolean; newShouts: Shout[] }> => { - options.limit += 1 const newShouts = await apiClient.getShouts(options) - const hasMore = newShouts?.length === options.limit + 1 + const hasMore = newShouts?.length !== options.limit + 1 && newShouts?.length !== 0 if (hasMore) { newShouts.splice(-1)