feat: boards with statuses fetch
This commit is contained in:
@ -1,17 +1,17 @@
|
||||
import { LexoRank } from "lexorank";
|
||||
|
||||
type LexorankSortable = {
|
||||
rank: string;
|
||||
lexorank: string;
|
||||
};
|
||||
|
||||
export function compareByLexorank<T extends LexorankSortable>(
|
||||
a: T,
|
||||
b: T
|
||||
): -1 | 1 | 0 {
|
||||
if (a.rank < b.rank) {
|
||||
if (a.lexorank < b.lexorank) {
|
||||
return -1;
|
||||
}
|
||||
if (a.rank > b.rank) {
|
||||
if (a.lexorank > b.lexorank) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user