diff --git a/frontend/src/app/album/[id]/page.tsx b/frontend/src/app/album/[id]/page.tsx
index 8803179..2636eea 100644
--- a/frontend/src/app/album/[id]/page.tsx
+++ b/frontend/src/app/album/[id]/page.tsx
@@ -2,6 +2,7 @@
import { useState, useEffect } from 'react'
import { Album } from '@/common/album.entity';
+import { Song } from '@/common/song.entity';
import { useParams } from 'next/navigation'
export default function Page() {
@@ -22,8 +23,15 @@ export default function Page() {
if (!album) return
Loading...
return (
-
- - {album.title} by {album.artist} ({album.genre})
-
+
+
+ {album.title} by {album.artist} ({album.genre})
+
+
+ {album.songs.map((song: Song) => (
+ - {song.title} ({song.duration})
+ ))}
+
+
);
}
diff --git a/frontend/src/common/album.entity.tsx b/frontend/src/common/album.entity.tsx
index 9925560..0dffb64 100644
--- a/frontend/src/common/album.entity.tsx
+++ b/frontend/src/common/album.entity.tsx
@@ -1,7 +1,9 @@
+import { Song } from '@/common/song.entity';
+
export interface Album {
id: number;
title: string;
artist: string;
genre: string;
- songs: string[];
+ songs: Song[];
}
diff --git a/frontend/src/common/song.entity.tsx b/frontend/src/common/song.entity.tsx
new file mode 100644
index 0000000..63e7bbe
--- /dev/null
+++ b/frontend/src/common/song.entity.tsx
@@ -0,0 +1,8 @@
+import { Album } from '@/common/album.entity';
+
+export interface Song {
+ id: number;
+ title: string;
+ duration: number;
+ album: Album;
+}