fix: filtering gap in associated media
This commit is contained in:
parent
bce70b8e4e
commit
0ced0001ff
4 changed files with 29 additions and 23 deletions
|
@ -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",
|
||||
|
|
Reference in a new issue