minor patch

This commit is contained in:
daniel31x13 2023-12-02 15:23:26 -05:00
parent c447b36540
commit 33be9e5d83

View File

@ -23,6 +23,7 @@ export default function NewLinkModal({ onClose }: Props) {
name: "", name: "",
url: "", url: "",
description: "", description: "",
type: "url",
tags: [], tags: [],
screenshotPath: "", screenshotPath: "",
pdfPath: "", pdfPath: "",
@ -32,7 +33,7 @@ export default function NewLinkModal({ onClose }: Props) {
name: "", name: "",
ownerId: data?.user.id as number, ownerId: data?.user.id as number,
}, },
}; } as LinkIncludingShortenedCollectionAndTags;
const [link, setLink] = const [link, setLink] =
useState<LinkIncludingShortenedCollectionAndTags>(initial); useState<LinkIncludingShortenedCollectionAndTags>(initial);
@ -127,7 +128,7 @@ export default function NewLinkModal({ onClose }: Props) {
<div className="sm:col-span-3 col-span-5"> <div className="sm:col-span-3 col-span-5">
<p className="mb-2">Link</p> <p className="mb-2">Link</p>
<TextInput <TextInput
value={link.url} value={link.url || ""}
onChange={(e) => setLink({ ...link, url: e.target.value })} onChange={(e) => setLink({ ...link, url: e.target.value })}
placeholder="e.g. http://example.com/" placeholder="e.g. http://example.com/"
className="bg-base-200" className="bg-base-200"