feat: add board access settings (#249)
* wip: add board access settings * wip: add user access control * wip: add user access control * feat: add user access control * refactor: move away from mantine-modal-manager * fix: ci issues and failing tests * fix: lint issue * fix: format issue * fix: deepsource issues * chore: address pull request feedback
This commit is contained in:
@@ -41,8 +41,12 @@ export const useItemActions = () => {
|
||||
({ kind }: CreateItem) => {
|
||||
updateBoard((previous) => {
|
||||
const lastSection = previous.sections
|
||||
.filter((s): s is EmptySection => s.kind === "empty")
|
||||
.sort((a, b) => b.position - a.position)[0];
|
||||
.filter(
|
||||
(section): section is EmptySection => section.kind === "empty",
|
||||
)
|
||||
.sort(
|
||||
(sectionA, sectionB) => sectionB.position - sectionA.position,
|
||||
)[0];
|
||||
|
||||
if (!lastSection) return previous;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user