fix file upload
This commit is contained in:
@ -46,7 +46,7 @@ export const ResourcePhoto = (input: ResourcePhotoProps) => {
|
||||
return (
|
||||
<Image
|
||||
className="w-full rounded-xl border border-neutral-400 bg-white drop-shadow-lg"
|
||||
src={blobSrc ?? `/resource_logos/${input.src ?? "logo_not_found.png"}`}
|
||||
src={`/resource_logos/${input.src ?? "logo_not_found.png"}`}
|
||||
alt={`${input.name} logo`}
|
||||
{...commonProps}
|
||||
/>
|
||||
|
@ -41,6 +41,7 @@ import Modal from "react-modal";
|
||||
import { type RouterInputs } from "~/utils/api";
|
||||
import { PlatformLinkButton } from "~/pages/resources/[id]";
|
||||
import { ResourcePhoto } from "~/components/ResourcePhoto";
|
||||
import Image from "next/image";
|
||||
|
||||
// Required for accessibility
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
||||
@ -90,10 +91,12 @@ const SelectImageInput = ({
|
||||
src={resource?.icon}
|
||||
/>
|
||||
) : (
|
||||
<ResourcePhoto
|
||||
photo={null}
|
||||
src={previewImg}
|
||||
name={resource?.name ?? "n/a"}
|
||||
<Image
|
||||
className="w-full"
|
||||
src={previewImg ?? ""}
|
||||
alt={`resource logo`}
|
||||
width={512}
|
||||
height={512}
|
||||
/>
|
||||
)}
|
||||
<div className="absolute bottom-0 left-0 right-0 top-0 hidden place-items-center group-hover:grid group-hover:bg-white/70">
|
||||
|
Reference in New Issue
Block a user