fix sorting

This commit is contained in:
Hunter Thornsberry
2024-06-28 12:30:06 -04:00
parent 2566395168
commit 569bb09f94
+2 -6
View File
@@ -34,12 +34,8 @@ export const Table = ({ headings, rows }: TableProps): JSX.Element => {
// Custom comparison for 'Last Heard' column
if (sortColumn === "Last Heard") {
const aTimestamp = a[columnIndex].props.timestamp
? a[columnIndex].props.timestamp
: 0;
const bTimestamp = b[columnIndex].props.timestamp
? b[columnIndex].props.timestamp
: 0;
const aTimestamp = aValue.props.timestamp ?? 0;
const bTimestamp = bValue.props.timestamp ?? 0;
if (aTimestamp < bTimestamp) {
return sortOrder === "asc" ? -1 : 1;