diff --git a/src/app/(with-header)/chuni/dashboard/page.tsx b/src/app/(with-header)/chuni/dashboard/page.tsx index 39803a9..12fd7f9 100644 --- a/src/app/(with-header)/chuni/dashboard/page.tsx +++ b/src/app/(with-header)/chuni/dashboard/page.tsx @@ -31,7 +31,9 @@ export default async function ChuniDashboard() {
Recent Plays
- {playlog.data.map((entry, i) => )} + {playlog.data.map((entry, i) => )}
); diff --git a/src/components/chuni/music-playlog.tsx b/src/components/chuni/music-playlog.tsx index 20e134e..aa18b5e 100644 --- a/src/components/chuni/music-playlog.tsx +++ b/src/components/chuni/music-playlog.tsx @@ -78,7 +78,9 @@ export const ChuniMusicPlaylog = ({ music, playlog }: ChuniMusicPlaylogProps) => {data.playlog.length ? setExpanded(e => ({ ...e, [i]: k as any }))}>
- {data.playlog.map(p => )} + {data.playlog.map(p => )}
: null diff --git a/src/components/chuni/playlog-card.tsx b/src/components/chuni/playlog-card.tsx index f2bb9e5..09f4383 100644 --- a/src/components/chuni/playlog-card.tsx +++ b/src/components/chuni/playlog-card.tsx @@ -12,7 +12,8 @@ import { Ticker, TickerHoverProvider } from '@/components/ticker'; export type ChuniPlaylogCardProps = { playlog: Awaited>['data'][number], - className?: string + className?: string, + badgeClass?: string }; const getChangeSign = (val: number) => { @@ -27,7 +28,7 @@ const getChangeColor = (val: number) => { return 'text-blue-500'; }; -export const ChuniPlaylogCard = ({ playlog, className }: ChuniPlaylogCardProps) => { +export const ChuniPlaylogCard = ({ playlog, className, badgeClass }: ChuniPlaylogCardProps) => { return ({setHover =>
setHover(true)} onMouseLeave={() => setHover(false)} className={`rounded-md bg-content1 relative flex flex-col p-2 pt-1 border border-black/25 ${className ?? ''}`}>
@@ -61,7 +62,7 @@ export const ChuniPlaylogCard = ({ playlog, className }: ChuniPlaylogCardProps)
+ className={`${badgeClass ? badgeClass : 'h-5'} my-auto flex gap-0.5 overflow-hidden`}> {playlog.score?.toLocaleString()}