Merge pull request #2 from brandonegg/enable-custom-icon-uploads

switch to img element for blobl image icons so they work on server si…
This commit is contained in:
Brandon Egger 2023-08-22 18:38:39 -05:00 committed by GitHub
commit de803671c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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"