Use next/form component when editing photos
This commit is contained in:
parent
a610c3fbd8
commit
02f2d08e04
@ -65,6 +65,7 @@ import SmallDisclosure from '@/components/SmallDisclosure';
|
||||
import { TbPhoto } from 'react-icons/tb';
|
||||
import { Albums } from '@/album';
|
||||
import FieldsetAlbum from '@/album/FieldsetAlbum';
|
||||
import Form from 'next/form';
|
||||
|
||||
const THUMBNAIL_SIZE = 300;
|
||||
|
||||
@ -450,7 +451,7 @@ export default function PhotoForm({
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
<form
|
||||
<Form
|
||||
action={data => (type === 'create'
|
||||
? createPhotoAction
|
||||
: updatePhotoAction
|
||||
@ -663,7 +664,7 @@ export default function PhotoForm({
|
||||
'dark:from-black/90 dark:from-50%',
|
||||
)} />
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user