diff --git a/attached_assets/image_1772471699130.png b/attached_assets/image_1772471699130.png new file mode 100644 index 0000000..020f4f8 Binary files /dev/null and b/attached_assets/image_1772471699130.png differ diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 3f6b135..5fe0471 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -526,18 +526,30 @@ export default function Home() { return copy.slice(0, 2); }, [articles]); + const bottomArticles = useMemo(() => { + if (!articles || articles.length < 10) return []; + const usedIds = new Set([ + ...articles.slice(0, 9).map((a) => a.id), + ...widePickedArticles.map((a) => a.id), + ]); + return articles.filter((a) => !usedIds.has(a.id)).slice(0, 2); + }, [articles, widePickedArticles]); + const bottomSection = useMemo(() => { - const items: { type: "widget" | "ad"; el: JSX.Element }[] = [ + const items: { type: "widget" | "ad" | "article"; el: JSX.Element }[] = [ { type: "widget", el: }, { type: "widget", el: }, { type: "widget", el: }, { type: "widget", el: }, - { type: "ad", el:
}, + ...bottomArticles.map((a) => ({ + type: "article" as const, + el: , + })), { type: "widget", el: }, - { type: "ad", el:
}, + { type: "ad", el:
}, ]; return items; - }, []); + }, [bottomArticles, focalPoints]); if (isLoading || !articles) { return (