diff --git a/frontend/src/components/ReportTopArtists.tsx b/frontend/src/components/ReportTopArtists.tsx index c55808a..f58153a 100644 --- a/frontend/src/components/ReportTopArtists.tsx +++ b/frontend/src/components/ReportTopArtists.tsx @@ -5,6 +5,7 @@ import { TimePreset } from "../api/entities/time-preset.enum"; import { useTopArtists } from "../hooks/use-api"; import { useAuth } from "../hooks/use-auth"; import { ReportTimeOptions } from "./ReportTimeOptions"; +import { TopListItem } from "./TopListItem"; export const ReportTopArtists: React.FC = () => { const { user } = useAuth(); @@ -53,9 +54,7 @@ export const ReportTopArtists: React.FC = () => { )} {reportHasItems && topArtists.map(({ artist, count }) => ( -
- {count} - {artist.name} -
+ ))} diff --git a/frontend/src/components/TopListItem.tsx b/frontend/src/components/TopListItem.tsx new file mode 100644 index 0000000..2727796 --- /dev/null +++ b/frontend/src/components/TopListItem.tsx @@ -0,0 +1,23 @@ +import React from "react"; + +export const TopListItem: React.FC<{ + key: string; + title: string; + subTitle?: string; + count: number; +}> = ({ key, title, subTitle, count }) => { + return ( +
+
+
+ {title} +
+ {subTitle &&
{subTitle}
} +
+
{count}
+
+ ); +};