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:
commit
de803671c0
@ -32,6 +32,19 @@ export const ResourcePhoto = ({ resource }: { resource: AuditoryResource }) => {
|
|||||||
height: 512,
|
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 (
|
return (
|
||||||
<Image
|
<Image
|
||||||
className="w-full rounded-xl border border-neutral-400 bg-white drop-shadow-lg"
|
className="w-full rounded-xl border border-neutral-400 bg-white drop-shadow-lg"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user