sorting variable name cleanup
This commit is contained in:
@ -65,7 +65,7 @@ export const columns: ColumnDef<chunithm>[] = [
|
||||
|
||||
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<chunithm>[] = [
|
||||
</div>
|
||||
),
|
||||
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;
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user