fix type errors

This commit is contained in:
Brandon Egger 2023-09-05 23:38:04 -05:00
parent ee86d453ba
commit 954c11101c
3 changed files with 6 additions and 6 deletions

View File

@ -49,7 +49,7 @@ export const ResourceInfo = ({
<ResourcePhoto <ResourcePhoto
name={resource.name} name={resource.name}
photo={resource.photo} photo={resource.photo}
src={resource.icon} src={resource.icon ?? undefined}
/> />
<span className="block rounded-lg border border-neutral-900 bg-neutral-900 py-[1px] text-center text-white hover:bg-neutral-500 print:hidden"> <span className="block rounded-lg border border-neutral-900 bg-neutral-900 py-[1px] text-center text-white hover:bg-neutral-500 print:hidden">
more info more info
@ -61,7 +61,7 @@ export const ResourceInfo = ({
<ResourcePhoto <ResourcePhoto
name={resource.name} name={resource.name}
photo={resource.photo} photo={resource.photo}
src={resource.icon} src={resource.icon ?? undefined}
/> />
</div> </div>
)} )}

View File

@ -1,6 +1,6 @@
import { ExclamationCircleIcon } from "@heroicons/react/24/solid"; import { ExclamationCircleIcon } from "@heroicons/react/24/solid";
import Link from "next/link"; import Link from "next/link";
import { useEffect, useState } from "react"; import { type ButtonHTMLAttributes, useEffect, useState } from "react";
const AdminActionBody = ({ const AdminActionBody = ({
label, label,
@ -49,7 +49,7 @@ const AdminActionConfirmButton = ({
label: string; label: string;
onConfirm?: () => void; onConfirm?: () => void;
symbol: JSX.Element | undefined; symbol: JSX.Element | undefined;
type?: HTMLButtonElement["type"]; type?: ButtonHTMLAttributes<HTMLButtonElement>["type"];
}) => { }) => {
const [isConfirmView, setConfirmView] = useState(false); const [isConfirmView, setConfirmView] = useState(false);
@ -96,7 +96,7 @@ const AdminActionButton = ({
label: string; label: string;
onClick?: () => void; onClick?: () => void;
symbol: JSX.Element | undefined; symbol: JSX.Element | undefined;
type?: HTMLButtonElement["type"]; type?: ButtonHTMLAttributes<HTMLButtonElement>["type"];
}) => { }) => {
return ( return (
<button <button

View File

@ -93,7 +93,7 @@ const SelectImageInput = () => {
<ResourcePhoto <ResourcePhoto
name={name ?? "unknown resource logo"} name={name ?? "unknown resource logo"}
photo={photo} photo={photo}
src={icon} src={icon ?? undefined}
/> />
<div className="absolute bottom-0 left-0 right-0 top-0 hidden place-items-center group-hover:grid group-hover:bg-white/70"> <div className="absolute bottom-0 left-0 right-0 top-0 hidden place-items-center group-hover:grid group-hover:bg-white/70">
<PencilSquareIcon className="w-16 text-black/50" /> <PencilSquareIcon className="w-16 text-black/50" />