From 041ca15a09bd0520dbeac179d862a80cbb8b2733 Mon Sep 17 00:00:00 2001 From: Jamie Pine Date: Sun, 25 Jan 2026 15:38:37 -0800 Subject: [PATCH] Refactor HistoryTable component for improved styling and structure - Reintroduced the cn utility for class name management in HistoryTable. - Adjusted the maximum height of the table container for better layout. - Reformatted the table structure for clearer readability and consistency. - Enhanced the styling of table cells and buttons for improved user interaction. --- app/src/components/History/HistoryTable.tsx | 68 +++++++++++---------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/app/src/components/History/HistoryTable.tsx b/app/src/components/History/HistoryTable.tsx index 6f9fa596..dc6b79a6 100644 --- a/app/src/components/History/HistoryTable.tsx +++ b/app/src/components/History/HistoryTable.tsx @@ -11,9 +11,9 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; -import { cn } from '@/lib/utils/cn'; import { apiClient } from '@/lib/api/client'; import { useDeleteGeneration, useHistory } from '@/lib/hooks/useHistory'; +import { cn } from '@/lib/utils/cn'; import { formatDate, formatDuration } from '@/lib/utils/format'; import { usePlayerStore } from '@/stores/playerStore'; @@ -70,42 +70,48 @@ export function HistoryTable() { ) : ( <> -
+
- - - Text - Profile - Language - Duration - Created - Actions - - - - {history.map((gen) => { - const isCurrentlyPlaying = currentAudioId === gen.id && isPlaying; - return ( - + + Text + Profile + Language + Duration + Created + Actions + + + + {history.map((gen) => { + const isCurrentlyPlaying = currentAudioId === gen.id && isPlaying; + return ( + handlePlay(gen.id, gen.text)} > {gen.text} {gen.profile_name} - {gen.language} + + {gen.language} + {formatDuration(gen.duration)} - {formatDate(gen.created_at)} + + {formatDate(gen.created_at)} + -
e.stopPropagation()}> +
e.stopPropagation()} + > handlePlay(gen.id, gen.text)} @@ -125,10 +131,10 @@ export function HistoryTable() {
- ); - })} - -
+ ); + })} + +