From f19ddc415c2de6f3bc62fbe05cf7b8731bf98d5f Mon Sep 17 00:00:00 2001 From: NotII <46204250+NotII@users.noreply.github.com> Date: Thu, 7 Aug 2025 23:24:51 +0100 Subject: [PATCH] eeeee --- app/dashboard/promotions/page.tsx | 6 +++++- components/dashboard/promotions/PromotionsList.tsx | 7 ++++--- package-lock.json | 8 ++++---- package.json | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/dashboard/promotions/page.tsx b/app/dashboard/promotions/page.tsx index 743b53b..afdea58 100644 --- a/app/dashboard/promotions/page.tsx +++ b/app/dashboard/promotions/page.tsx @@ -1,7 +1,7 @@ import { Suspense } from "react"; import Dashboard from "@/components/dashboard/dashboard"; import { Metadata, Viewport } from "next"; -import PromotionsList from "@/components/dashboard/promotions/PromotionsList"; +import dynamic from "next/dynamic"; import PromotionsPageSkeleton from "@/components/dashboard/promotions/PromotionsPageSkeleton"; import { Ticket } from "lucide-react"; @@ -20,6 +20,10 @@ export const viewport: Viewport = { }; export default function PromotionsPage() { + const PromotionsList = dynamic(() => import("@/components/dashboard/promotions/PromotionsList"), { + loading: () => + }); + return (
diff --git a/components/dashboard/promotions/PromotionsList.tsx b/components/dashboard/promotions/PromotionsList.tsx index 97c4227..0e4daa2 100644 --- a/components/dashboard/promotions/PromotionsList.tsx +++ b/components/dashboard/promotions/PromotionsList.tsx @@ -32,9 +32,10 @@ import { toast } from '@/components/ui/use-toast'; import { Badge } from '@/components/ui/badge'; import { Promotion } from '@/lib/types/promotion'; import { fetchClient } from '@/lib/api'; -import NewPromotionForm from './NewPromotionForm'; -import EditPromotionForm from './EditPromotionForm'; -import PromotionDetailsModal from './PromotionDetailsModal'; +import dynamic from 'next/dynamic'; +const NewPromotionForm = dynamic(() => import('./NewPromotionForm')); +const EditPromotionForm = dynamic(() => import('./EditPromotionForm')); +const PromotionDetailsModal = dynamic(() => import('./PromotionDetailsModal')); export default function PromotionsList() { const router = useRouter(); diff --git a/package-lock.json b/package-lock.json index d41dd0b..113c643 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,7 +63,7 @@ "zod": "^3.24.1" }, "devDependencies": { - "@next/bundle-analyzer": "^15.4.1", + "@next/bundle-analyzer": "^15.4.6", "@tailwindcss/typography": "^0.5.16", "@types/lodash": "^4.17.16", "@types/node": "^22", @@ -861,9 +861,9 @@ } }, "node_modules/@next/bundle-analyzer": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-15.4.1.tgz", - "integrity": "sha512-O5R3iPLR3/oQWFIXl+Mnd02IyhvWBterTlXcceIGw29QHWL/gjvyO0eIVEvrJPS7zzE6/NSu1TiSVgi8mxotlw==", + "version": "15.4.6", + "resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-15.4.6.tgz", + "integrity": "sha512-LZWqTQgIpfhblT77VVc1r4qtHJY1pfZOAIx8zNtliU7L3pMjpNrG4rYWikJ7AyAI/RgYyt2sCVWqkeOZmFp7Zg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index a1e3e82..2c27cb8 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "zod": "^3.24.1" }, "devDependencies": { - "@next/bundle-analyzer": "^15.4.1", + "@next/bundle-analyzer": "^15.4.6", "@tailwindcss/typography": "^0.5.16", "@types/lodash": "^4.17.16", "@types/node": "^22",