mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-22 20:11:50 -07:00
add timeframe selectors for rewind
This commit is contained in:
parent
ddb0becc0f
commit
a0b32f756e
2 changed files with 184 additions and 30 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue