From 54e8b0801b4f2c53e284a7ea31643937d45f130f Mon Sep 17 00:00:00 2001 From: walsh9 Date: Tue, 18 Oct 2022 21:18:24 +0000 Subject: [PATCH] dedupe in the homepage topper (#177) --- components/GothamistHomepageTopper.vue | 9 ++++++++- pages/index.vue | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/components/GothamistHomepageTopper.vue b/components/GothamistHomepageTopper.vue index f991719f..180d4312 100644 --- a/components/GothamistHomepageTopper.vue +++ b/components/GothamistHomepageTopper.vue @@ -11,7 +11,14 @@ const props = defineProps<{ }>() const featuredArticle = computed(() => props.articles[0]) -const latestArticles = computed(() => props.articles.slice(1)) +const latestArticles = computed(() => { + return props.articles.slice(1) + // remove the manually curated featured article + // from the list of latest articles so it + // doesn't show up twice in this module + .filter(article => article.uuid !== featuredArticle.value.uuid) + .slice(0,4) +})