Right rail template

This commit is contained in:
adilallo
2026-02-28 23:16:10 -07:00
parent f5bfb25f5e
commit 0799636c78
60 changed files with 1255 additions and 305 deletions
+9 -4
View File
@@ -1,4 +1,5 @@
import "@testing-library/jest-dom/vitest";
import type React from "react";
import { afterAll, afterEach, beforeAll, vi } from "vitest";
import { cleanup } from "@testing-library/react";
import { server } from "./tests/msw/server";
@@ -11,15 +12,19 @@ import { server } from "./tests/msw/server";
vi.mock("next/dynamic", () => {
const React = require("react");
return {
default: (importFn: () => Promise<any>, options?: any) => {
default: (
importFn: () => Promise<{ default?: React.ComponentType }>,
options?: { loading?: () => React.ReactNode },
) => {
// In tests, return a component that immediately resolves and renders
return function DynamicComponent(props: any) {
const [Component, setComponent] = React.useState(null);
return function DynamicComponent(props: Record<string, unknown>) {
const [Component, setComponent] =
React.useState<React.ComponentType | null>(null);
const [loading, setLoading] = React.useState(true);
React.useEffect(() => {
importFn()
.then((mod: any) => {
.then((mod: { default?: React.ComponentType }) => {
setComponent(mod.default || mod);
setLoading(false);
})