fixed usestate callback errors

This commit is contained in:
Polaris
2024-08-27 17:07:44 -04:00
parent d5d62572ba
commit a18e50d990
4 changed files with 71 additions and 45 deletions

View File

@ -46,17 +46,23 @@ export const ChunithmNextPlays: FC<ChunithmProfileHotPlays> = ({
return (
<div key={index} className="flex flex-col items-center p-2">
<div className="font-bold"></div>
{jacketPath ? (
<img
src={`/jacketArts/${jacketPath}`}
alt="Jacket"
className={`mr-2 inline-block h-[100px] w-[100px] ${
isLoading ? "hidden" : ""
}`}
onLoad={handleImageLoad}
onError={handleImageError}
/>
) : (
{jacketPath && (
<>
<img
src={`/jacketArts/${jacketPath}`}
alt="Jacket"
className={`mr-2 inline-block h-[100px] w-[100px] ${
isLoading ? "hidden" : ""
}`}
onLoad={handleImageLoad}
onError={handleImageError}
/>
{isLoading && (
<Skeleton className="mr-2 inline-block h-[100px] w-[100px]" />
)}
</>
)}
{!jacketPath && (
<Skeleton className="mr-2 inline-block h-[100px] w-[100px]" />
)}
<div>