diff --git a/components/scoreplaylog/colums.tsx b/components/scoreplaylog/colums.tsx index 293fd35..285ba93 100644 --- a/components/scoreplaylog/colums.tsx +++ b/components/scoreplaylog/colums.tsx @@ -65,7 +65,7 @@ export const columns: ColumnDef[] = [ if (highScore < lowScore) return 1; if (highScore > lowScore) return -1; - + // TODO: FIGURE OUT DEFAULT SORT return 0; }, }, @@ -126,12 +126,11 @@ export const columns: ColumnDef[] = [ ), sortingFn: (a, b) => { - const isAllJusticeA = a.original.isAllJustice; - const isAllJusticeB = b.original.isAllJustice; + const isAllJustice = a.original.isAllJustice; + const defaultSort = b.original.isAllJustice; - // Show All Justice entries first - if (isAllJusticeA && !isAllJusticeB) return -1; - if (!isAllJusticeA && isAllJusticeB) return 1; + if (isAllJustice && !defaultSort) return -1; + if (!isAllJustice && defaultSort) return 1; return 0; }, },