Fix album form submission bug

This commit is contained in:
Sam Becker 2025-10-05 19:13:59 -05:00
parent e8517c6cdd
commit 5c2dd092e4
2 changed files with 4 additions and 6 deletions

View File

@ -43,7 +43,6 @@ export default function AdminAlbumForm({
className="max-w-[38rem] space-y-4"
>
{ALBUM_FORM_META
.filter(({ hidden }) => !hidden)
.map(({ key, label, type, readOnly }) => (
<FieldsetWithStatus
key={key}

View File

@ -8,16 +8,15 @@ export const ALBUM_FORM_META: {
type: FieldSetType
required?: boolean
readOnly?: boolean
hidden?: boolean
}[] = [
{ key: 'id', type: 'text', readOnly: true, hidden: true },
{ key: 'id', type: 'hidden', readOnly: true },
{ key: 'title', type: 'text', required: true },
{ key: 'slug', type: 'text', required: true, readOnly: true },
{ key: 'subhead', type: 'text' },
{ key: 'description', type: 'textarea' },
{ key: 'locationName', label: 'location name', type: 'text', hidden: true },
{ key: 'latitude', type: 'text', hidden: true },
{ key: 'longitude', type: 'text', hidden: true },
{ key: 'locationName', label: 'location name', type: 'hidden' },
{ key: 'latitude', type: 'hidden' },
{ key: 'longitude', type: 'hidden' },
];
export const convertFormDataToAlbum = (formData: FormData): Album => {