File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import { ScrollArea , ScrollBar } from "@/components/ui/scroll-area" ;
1010import { Database , Pencil , Trash2 } from "lucide-react" ;
1111import { Button } from "@/components/ui/button" ;
12+ import { formatTimestamp } from "@/lib/utils" ;
1213
1314interface DataTableProps {
1415 data : Array < Record < string , any > > ;
@@ -173,7 +174,7 @@ function formatCellValue(value: any): React.ReactNode {
173174 if ( value instanceof Date ) {
174175 return (
175176 < span className = "text-violet-600 dark:text-violet-400" >
176- { value . toLocaleString ( ) }
177+ { formatTimestamp ( value . toISOString ( ) ) }
177178 </ span >
178179 ) ;
179180 }
@@ -196,7 +197,7 @@ function formatCellValue(value: any): React.ReactNode {
196197
197198 // Check if it looks like a date string
198199 if ( / ^ \d { 4 } - \d { 2 } - \d { 2 } / . test ( strValue ) ) {
199- return < span className = "text-violet-600 dark:text-violet-400" > { strValue } </ span > ;
200+ return < span className = "text-violet-600 dark:text-violet-400" > { formatTimestamp ( strValue ) } </ span > ;
200201 }
201202
202203 // Check if it looks like an ID or UUID
You can’t perform that action at this time.
0 commit comments