+ {months[month]} +
+ +{year}
+ +From 62267652ba8b111fb7c641ac81e9f4f775e01540 Mon Sep 17 00:00:00 2001 From: Gabe Farrell <90876006+gabehf@users.noreply.github.com> Date: Mon, 12 Jan 2026 23:22:29 -0500 Subject: [PATCH] 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 --- client/app/components/rewind/Rewind.tsx | 13 +- client/app/components/sidebar/Sidebar.tsx | 4 +- client/app/routes/RewindPage.tsx | 205 +++++++++++++++++++--- client/app/utils/utils.ts | 13 +- 4 files changed, 197 insertions(+), 38 deletions(-) diff --git a/client/app/components/rewind/Rewind.tsx b/client/app/components/rewind/Rewind.tsx index 8e1908c..2553b35 100644 --- a/client/app/components/rewind/Rewind.tsx +++ b/client/app/components/rewind/Rewind.tsx @@ -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
Not enough data exists to create a Rewind for this period :(
; + } return (+ {months[month]} +
+ +{year}
+ +