diff --git a/app/admin/page.tsx b/app/admin/page.tsx
index 0a0f09a..dac4b32 100644
--- a/app/admin/page.tsx
+++ b/app/admin/page.tsx
@@ -11,7 +11,7 @@ interface Song {
activations: number;
}
-type SortField = 'title' | 'artist';
+type SortField = 'title' | 'artist' | 'createdAt';
type SortDirection = 'asc' | 'desc';
export default function AdminPage() {
@@ -229,6 +229,12 @@ export default function AdminPage() {
>
Artist {sortField === 'artist' && (sortDirection === 'asc' ? '↑' : '↓')}
+
handleSort('createdAt')}
+ >
+ Added {sortField === 'createdAt' && (sortDirection === 'asc' ? '↑' : '↓')}
+ |
Activations |
Actions |
@@ -258,6 +264,9 @@ export default function AdminPage() {
style={{ padding: '0.25rem' }}
/>
+
+ {new Date(song.createdAt).toLocaleDateString('de-DE')}
+ |
{song.activations} |
@@ -282,6 +291,9 @@ export default function AdminPage() {
<>
{song.title} |
{song.artist} |
+
+ {new Date(song.createdAt).toLocaleDateString('de-DE')}
+ |
{song.activations} |
@@ -307,7 +319,7 @@ export default function AdminPage() {
))}
{paginatedSongs.length === 0 && (
|
- |
+ |
{searchQuery ? 'No songs found matching your search.' : 'No songs uploaded yet.'}
|
|