From 5b6a6004da5295349a561cd53b26aba578afae27 Mon Sep 17 00:00:00 2001 From: Phill Pover Date: Mon, 7 Apr 2025 02:16:11 +0100 Subject: [PATCH] Adding a isblank check --- frontend/src/app/album/[id]/page.tsx | 68 ++++++++++++++-------------- frontend/src/app/album/page.tsx | 2 +- frontend/src/utils/string.util.tsx | 2 +- 3 files changed, 35 insertions(+), 37 deletions(-) diff --git a/frontend/src/app/album/[id]/page.tsx b/frontend/src/app/album/[id]/page.tsx index 028f935..585f7d0 100644 --- a/frontend/src/app/album/[id]/page.tsx +++ b/frontend/src/app/album/[id]/page.tsx @@ -46,7 +46,7 @@ export default function Page() { const formData = new FormData(event.currentTarget); try { - if (StringUtils.isBlank(formData.get('id'))) { + if (StringUtils.isBlank(formData.get('id') as string)) { const data = await createSong(formData); console.log(data); } else { @@ -108,41 +108,39 @@ export default function Page() { return ( <>
-
-
- {album.title} by {album.artist} ({album.genre}) -
- - - - - - - - - - - - - - {album.songs.map((song: Song) => ( - - - - - - - ))} - -
#TitleDurationControls
{song.trackNumber}{song.title}{TimeUtils.fancyTimeFormat(song.duration)} - - - - - - -
+
+ {album.title} by {album.artist} ({album.genre})
+ + + + + + + + + + + + + + {album.songs.map((song: Song) => ( + + + + + + + ))} + +
#TitleDurationControls
{song.trackNumber}{song.title}{TimeUtils.fancyTimeFormat(song.duration)} + + + + + + +