diff --git a/frontend/src/app/album/page.tsx b/frontend/src/app/album/page.tsx index 9cd31e3..649aed6 100644 --- a/frontend/src/app/album/page.tsx +++ b/frontend/src/app/album/page.tsx @@ -81,6 +81,19 @@ export default function Page() { } } + const handleDelete = async (event: MouseEvent) => { + const id = event.currentTarget.getAttribute('album-id'); + if (id) { + try { + await deleteAlbum(parseInt(id)); + } catch (error) { + console.error(`Error deleting album with ID ${id}:`, error); + } + } else { + console.error("Couldn't get ID of clicked element"); + } + } + if (!albums) return
Loading...
return (