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",
|
||||
|
|
|
@ -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>
|
||||
|
|
Reference in a new issue