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",

View file

@ -31,7 +31,7 @@ const link = links[0];
</h2>
<p>
<span class="music">Top artist this week:</span>
<a href={artist.artist_url} data-astro-prefetch>{artist.artist_name}</a>
<a href={artist.artist_url} data-astro-prefetch>{artist.artist_name}</a> with <strong class="highlight-text">{artist.plays} plays</strong>
</p>
<p>
<span class="music">Top track this week:</span>