minor UX improvement
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
@@ -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={{
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user