mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 07:13:29 +00:00
fix(insights,settings): restore hero-strip column width, gate hero fieldset on hydration
This commit is contained in:
1 parent
41a18813d1
commit
668e3ca6b6
3 files changed
+24
-1
No files matched your search
@@ -69,6 +69,16 @@ vi.mock("@/hooks/use-auth", () => ({
|
||||
useAuth: () => ({ user: { modules: authState.modules } }),
|
||||
}));
|
||||
|
||||
// The hero fieldset gates its presence via `useMounted()` (v1.34, hydration
|
||||
// fix). Under SSR (`renderToStaticMarkup`) `useMounted()` returns `false`,
|
||||
// which would hide the fieldset from every test below regardless of
|
||||
// `layout`. Force it to the hydrated (`true`) snapshot so these tests
|
||||
// exercise the real post-mount content — same convention as
|
||||
// layout-section.test.tsx for the identical `LayoutModuleGate` pattern.
|
||||
vi.mock("@/hooks/use-mounted", () => ({
|
||||
useMounted: () => true,
|
||||
}));
|
||||
|
||||
import { I18nProvider } from "@/lib/i18n/context";
|
||||
import {
|
||||
DashboardLayoutSection,
|
||||
|
||||
Reference in new issue
Block a user