mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-07 21:48:18 -08:00
fix: better error handling on client
This commit is contained in:
parent
fed2c5b956
commit
fdaea6284e
7 changed files with 136 additions and 101 deletions
|
|
@ -67,12 +67,14 @@ export default function LastPlays(props: Props) {
|
|||
<p>Loading...</p>
|
||||
</div>
|
||||
);
|
||||
} else if (isError) {
|
||||
return (
|
||||
<div className="w-[300px] sm:w-[500px]">
|
||||
<h2>Last Played</h2>
|
||||
<p className="error">Error: {error.message}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
if (isError) {
|
||||
return <p className="error">Error: {error.message}</p>;
|
||||
}
|
||||
|
||||
if (!data.items) return;
|
||||
|
||||
const listens = items ?? data.items;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue