diff --git a/client/src/pages/category.tsx b/client/src/pages/category.tsx index b8a99c5..ff73de4 100644 --- a/client/src/pages/category.tsx +++ b/client/src/pages/category.tsx @@ -8,6 +8,7 @@ import { Button } from "@/components/ui/button"; import { Skeleton } from "@/components/ui/skeleton"; import Header from "@/components/header"; import Footer from "@/components/footer"; +import { ArticleCardAd } from "@/components/adsense"; export default function CategoryPage() { const { category } = useParams<{ category: string }>(); @@ -46,47 +47,53 @@ export default function CategoryPage() { ) : articles && articles.length > 0 ? (
- {articles.map((article) => ( - -
-
-
- {article.title} + {articles.flatMap((article, index) => { + const items = [ + +
+
+
+ {article.title} +
-
-
-
- {article.author} - · - {format(new Date(article.publishedAt), "d. MMMM yyyy", { locale: de })} +
+
+ {article.author} + · + {format(new Date(article.publishedAt), "d. MMMM yyyy", { locale: de })} +
+

+ {article.title} +

+

+ {article.excerpt} +

+
+ + + {article.views.toLocaleString()} + + +
-

- {article.title} -

-

- {article.excerpt} -

-
- - - {article.views.toLocaleString()} - - -
-
-
- - ))} + + , + ]; + if (index === 2) { + items.push(); + } + return items; + })}
) : (