fix: filtering gap in associated media

This commit is contained in:
Cory Dransfeldt 2024-12-02 14:10:34 -08:00
parent bce70b8e4e
commit 0ced0001ff
No known key found for this signature in database
4 changed files with 29 additions and 23 deletions

View file

@ -1,5 +1,5 @@
---
import { parseISO, format } from "date-fns";
import { isBefore, parseISO, format } from "date-fns";
import IconMapper from "@components/IconMapper.astro";
const {
@ -56,7 +56,7 @@ const sections = [
icon: "article",
cssClass: "article",
label: "Related post(s)",
items: posts || [],
items: posts?.filter((post) => isBefore(new Date(post.date), new Date())) || [],
},
{
key: "shows",