feat: improve rewind page (#130)

* add timeframe selectors for rewind

* alter rewind nav to default to monthly rewind

* fix rewind default page

* remove superfluous parameters
This commit is contained in:
Gabe Farrell 2026-01-12 23:22:29 -05:00 committed by GitHub
parent ddb0becc0f
commit 62267652ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 197 additions and 38 deletions

View file

@ -8,9 +8,16 @@ interface Props {
}
export default function Rewind(props: Props) {
const artistimg = props.stats.top_artists[0].image;
const albumimg = props.stats.top_albums[0].image;
const trackimg = props.stats.top_tracks[0].image;
const artistimg = props.stats.top_artists[0]?.image;
const albumimg = props.stats.top_albums[0]?.image;
const trackimg = props.stats.top_tracks[0]?.image;
if (
!props.stats.top_artists[0] ||
!props.stats.top_albums[0] ||
!props.stats.top_tracks[0]
) {
return <p>Not enough data exists to create a Rewind for this period :(</p>;
}
return (
<div className="flex flex-col gap-7">
<h2>{props.stats.title}</h2>