mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-23 04:21:51 -07:00
wip
This commit is contained in:
parent
6b73f83484
commit
b5e8d88451
29 changed files with 1271 additions and 963 deletions
32
client/app/components/rewind/RewindTopItem.tsx
Normal file
32
client/app/components/rewind/RewindTopItem.tsx
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { imageUrl, type Artist } from "api/api";
|
||||
|
||||
interface args {
|
||||
title?: string;
|
||||
name?: string;
|
||||
image: string;
|
||||
minutes_listened: number;
|
||||
time_listened: number;
|
||||
artists?: Artist;
|
||||
}
|
||||
|
||||
export default function RewindTopItem(args: args[]) {
|
||||
console.log(args);
|
||||
if (args === undefined || args.length < 1) {
|
||||
return <></>;
|
||||
}
|
||||
const img = imageUrl(args[0].image, "medium");
|
||||
|
||||
return (
|
||||
<div className="flex gap-2">
|
||||
<div className="rewind-top-item-image">
|
||||
<img src={img} />
|
||||
</div>
|
||||
<div className="flex flex-col gap-1">
|
||||
<h3>{args[0].title || args[0].name}</h3>
|
||||
{args.map((e) => (
|
||||
<div className="">{e.title || e.name}</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue