feat: board creation and actions dropdown

This commit is contained in:
2025-08-07 09:19:30 +04:00
parent 4b843d8e5d
commit 335fbfe81c
12 changed files with 341 additions and 61 deletions

View File

@ -21,6 +21,15 @@ export function sortByLexorank<T extends LexorankSortable>(items: T[]): T[] {
return items.sort(compareByLexorank);
}
export function getMaxByLexorank<T extends LexorankSortable>(
items: T[]
): T | null {
return items.reduce(
(max, item) => (!max || item.lexorank > max.lexorank ? item : max),
null as T | null
);
}
export function getNewLexorank(
left?: LexoRank | null,
right?: LexoRank | null