switch to img element for blobl image icons so they work on server side rendered pages

This commit is contained in:
Brandon Egger 2023-08-22 15:53:37 -05:00
parent e61f9e10ce
commit bdd14822e3

View File

@ -32,6 +32,19 @@ export const ResourcePhoto = ({ resource }: { resource: AuditoryResource }) => {
height: 512,
};
if (blobSrc) {
return (
// Required because blob image processed by client, not server
// eslint-disable-next-line @next/next/no-img-element
<img
className="w-full rounded-xl border border-neutral-400 bg-white drop-shadow-lg"
src={blobSrc ?? `/resource_logos/${resource.icon}`}
alt={`${resource.name} logo`}
{...commonProps}
/>
);
}
return (
<Image
className="w-full rounded-xl border border-neutral-400 bg-white drop-shadow-lg"