From 9e3bf1e5ecbe1e70db4f11c7de59cd2df5f99890 Mon Sep 17 00:00:00 2001 From: Daniel Bachler Date: Tue, 31 Oct 2023 16:56:11 +0100 Subject: [PATCH] :sparkles: use thumbnails for wp posts --- db/wpdb.ts | 2 +- site/DataPageV2Content.tsx | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/db/wpdb.ts b/db/wpdb.ts index 3d07ff1d3e3..3e68d1ce964 100644 --- a/db/wpdb.ts +++ b/db/wpdb.ts @@ -689,7 +689,7 @@ export const getRelatedResearchAndWritingForVariable = async ( p.slug as postSlug, coalesce(csr.chart_id, c.id) as chartId, p.authors as authors, - '' as thumbnail, -- TODO: add thumbnail once we have it + p.featured_image as thumbnail, coalesce(pv.views_365d, 0) as pageviews, 'wordpress' as post_source from diff --git a/site/DataPageV2Content.tsx b/site/DataPageV2Content.tsx index fba577c4d46..714a1046bd6 100644 --- a/site/DataPageV2Content.tsx +++ b/site/DataPageV2Content.tsx @@ -304,9 +304,16 @@ export const DataPageV2Content = ({ */} {/* // TODO: switch this to use the Image component and put the required information for the thumbnails into hte attachment context or similar */}