fix: ui tweaks and fixes (#134)

This commit is contained in:
Gabe Farrell 2026-01-13 23:25:31 -05:00 committed by GitHub
parent c2a0987946
commit 288d04d714
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 40 additions and 27 deletions

View file

@ -30,17 +30,19 @@ export default function TopAlbums(props: Props) {
queryFn: ({ queryKey }) => getTopAlbums(queryKey[1] as getItemsArgs),
});
const header = "Top albums";
if (isPending) {
return (
<div className="w-[300px]">
<h3>Top Albums</h3>
<h3>{header}</h3>
<p>Loading...</p>
</div>
);
} else if (isError) {
return (
<div className="w-[300px]">
<h3>Top Albums</h3>
<h3>{header}</h3>
<p className="error">Error: {error.message}</p>
</div>
);
@ -54,7 +56,7 @@ export default function TopAlbums(props: Props) {
props.artistId ? `&artist_id=${props.artistId}` : ""
}`}
>
Top Albums
{header}
</Link>
</h3>
<div className="max-w-[300px]">