|
|
@ -29,9 +29,12 @@ const EventTable: React.FC<EventTableProps> = ({ events, className = '' }) => { |
|
|
|
let aValue = a[sortField as keyof typeof a]; |
|
|
|
let bValue = b[sortField as keyof typeof b]; |
|
|
|
|
|
|
|
if (sortField === 'created_at') { |
|
|
|
aValue = new Date(aValue as string).getTime(); |
|
|
|
bValue = new Date(bValue as string).getTime(); |
|
|
|
let aVal: string | number = aValue; |
|
|
|
let bVal: string | number = bValue; |
|
|
|
|
|
|
|
if (sortField === "created_at") { |
|
|
|
aVal = new Date(aValue as string).getTime(); |
|
|
|
bVal = new Date(bValue as string).getTime(); |
|
|
|
} |
|
|
|
|
|
|
|
if (aValue === null) return 1; |
|
|
|