From 5e8f1b15097315fa602cf4c84cf99ed31bb4ee76 Mon Sep 17 00:00:00 2001 From: Phill Pover Date: Sun, 6 Apr 2025 18:55:54 +0100 Subject: [PATCH] Fixing form submission --- frontend/src/app/album/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/album/page.tsx b/frontend/src/app/album/page.tsx index 6205ce3..8c12e68 100644 --- a/frontend/src/app/album/page.tsx +++ b/frontend/src/app/album/page.tsx @@ -25,13 +25,13 @@ export default function Page() { const handleSubmit = async (event: FormEvent) => { event.preventDefault(); + handleClose(); const formData = new FormData(event.currentTarget); try { const response = await createAlbum(formData); const data = response.json(); console.log(data); - handleClose(); } catch (error) { console.error('Error creating Album:', error); }