(() => {
+ return sortedArticles()
+ .slice(PRERENDERED_ARTICLES_COUNT + CLIENT_LOAD_ARTICLES_COUNT)
+ .reduce((acc, article, index) => {
+ if (index % LOAD_MORE_PAGE_SIZE === 0) {
+ acc.push([])
+ }
+
+ acc[acc.length - 1].push(article)
+ return acc
+ }, [] as Shout[][])
+ })
+
return (
@@ -102,15 +120,12 @@ export const HomeView = (props: HomeProps) => {
- {/*FIXME: ?*/}
-
-
-
+
@@ -118,9 +133,9 @@ export const HomeView = (props: HomeProps) => {
-
+
- {t('Top commented')}} />
+ {t('Top commented')}} />
{randomLayout()}
@@ -144,7 +159,19 @@ export const HomeView = (props: HomeProps) => {
- {(article) => }
+
+ {(page) => (
+ <>
+
+
+
+
+
+
+
+ >
+ )}
+