minor UX improvement

This commit is contained in:
Daniel 2023-07-18 12:06:47 -04:00
parent b07040a26f
commit 11152caf6d
3 changed files with 3 additions and 5 deletions

View File

@ -45,6 +45,7 @@ export default function CollectionSelection({ onChange, defaultValue }: Props) {
return ( return (
<Select <Select
isClearable isClearable
placeholder="Unnamed Collection"
onChange={onChange} onChange={onChange}
options={options} options={options}
styles={styles} styles={styles}

View File

@ -155,10 +155,7 @@ export default function AddOrEditLink({
) : null} ) : null}
<div> <div>
<p className="text-sm text-sky-500 mb-2"> <p className="text-sm text-sky-500 mb-2">Collection</p>
Collection
<RequiredBadge />
</p>
<CollectionSelection <CollectionSelection
onChange={setCollection} onChange={setCollection}
// defaultValue={{ // defaultValue={{

View File

@ -15,7 +15,7 @@ export default async function postLink(
if (!link.name) { if (!link.name) {
return { response: "Please enter a valid name for the link.", status: 400 }; return { response: "Please enter a valid name for the link.", status: 400 };
} else if (!link.collection.name) { } else if (!link.collection.name) {
link.collection.name = "Other"; link.collection.name = "Unnamed Collection";
} }
if (link.collection.id) { if (link.collection.id) {