fix(dashboard): restore vertical compaction so widgets auto-align when dragged

This commit is contained in:
2026-04-09 20:19:24 +02:00
parent c83bd5f97f
commit 4875096b13
@@ -1,7 +1,7 @@
"use client"; "use client";
import type { DashboardWidgetConfig, DashboardWidgetType } from "@capakraken/shared/types"; import type { DashboardWidgetConfig, DashboardWidgetType } from "@capakraken/shared/types";
import { noCompactor } from "react-grid-layout"; import { verticalCompactor } from "react-grid-layout";
import dynamic from "next/dynamic"; import dynamic from "next/dynamic";
import { Suspense, useState, useRef, useEffect, useMemo } from "react"; import { Suspense, useState, useRef, useEffect, useMemo } from "react";
import { useDashboardLayout } from "~/hooks/useDashboardLayout.js"; import { useDashboardLayout } from "~/hooks/useDashboardLayout.js";
@@ -313,7 +313,7 @@ export function DashboardClient() {
breakpoints={{ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }} breakpoints={{ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }}
cols={{ lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 }} cols={{ lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 }}
rowHeight={80} rowHeight={80}
compactor={noCompactor} compactor={verticalCompactor}
onLayoutChange={( onLayoutChange={(
_: unknown, _: unknown,
allLayouts: Record< allLayouts: Record<