From 68d49560779633274fe021b1f210fa29cb6c7df3 Mon Sep 17 00:00:00 2001 From: ajnart <49837342+ajnart@users.noreply.github.com> Date: Thu, 4 Jun 2026 21:26:19 +0000 Subject: [PATCH] style: auto-fix lint and format --- apps/nextjs/src/app/[locale]/boards/(content)/_edit-board.tsx | 2 +- .../src/components/board/sections/static-grid-layout.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/nextjs/src/app/[locale]/boards/(content)/_edit-board.tsx b/apps/nextjs/src/app/[locale]/boards/(content)/_edit-board.tsx index 157f1c174..5ce139c79 100644 --- a/apps/nextjs/src/app/[locale]/boards/(content)/_edit-board.tsx +++ b/apps/nextjs/src/app/[locale]/boards/(content)/_edit-board.tsx @@ -13,7 +13,7 @@ const EditModeBoard = () => { const fullWidthSortedSections = board.sections .filter((section) => section.kind === "empty" || section.kind === "category") - .sort((sectionA, sectionB) => sectionA.yOffset - sectionB.yOffset); + .toSorted((sectionA, sectionB) => sectionA.yOffset - sectionB.yOffset); return ( diff --git a/apps/nextjs/src/components/board/sections/static-grid-layout.ts b/apps/nextjs/src/components/board/sections/static-grid-layout.ts index db6b17d2b..87c893eb4 100644 --- a/apps/nextjs/src/components/board/sections/static-grid-layout.ts +++ b/apps/nextjs/src/components/board/sections/static-grid-layout.ts @@ -8,7 +8,7 @@ const DEFAULT_SMALL_VIEWPORT_WIDTH = 360; const DEFAULT_LARGE_VIEWPORT_WIDTH = 1280; export const getStaticGridLayouts = (layouts: Board["layouts"]) => - [...layouts].sort((layoutA, layoutB) => layoutA.breakpoint - layoutB.breakpoint); + [...layouts].toSorted((layoutA, layoutB) => layoutA.breakpoint - layoutB.breakpoint); const escapeCssString = (value: string) => value.replaceAll("\\", "\\\\").replaceAll('"', '\\"'); @@ -70,7 +70,7 @@ export const getStaticGridElements = (board: Board, sectionId: string, layoutId: return [ ...getSectionItemsForLayout(board, sectionId, layoutId), ...getDynamicSectionsForLayout(board, sectionId, layoutId), - ].sort((itemA, itemB) => { + ].toSorted((itemA, itemB) => { if (itemA.yOffset === itemB.yOffset) return itemA.xOffset - itemB.xOffset; return itemA.yOffset - itemB.yOffset; });