From 02746834ecede2d845179e6d99e45c8c3b888165 Mon Sep 17 00:00:00 2001 From: tedraykov Date: Mon, 1 Jul 2024 22:52:39 +0300 Subject: [PATCH] dynamically import warranty and order confirmation in orders page --- app/account/(orders)/page.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/account/(orders)/page.tsx b/app/account/(orders)/page.tsx index 32ac1f27b..3e833f54f 100644 --- a/app/account/(orders)/page.tsx +++ b/app/account/(orders)/page.tsx @@ -1,6 +1,4 @@ import { InformationCircleIcon } from '@heroicons/react/24/outline'; -import OrderConfirmation from 'components/orders/order-confirmation'; -import ActivateWarranty from 'components/orders/activate-warranty'; import MobileOrderActions from 'components/orders/mobile-order-actions'; import OrdersHeader from 'components/orders/orders-header'; import Price from 'components/price'; @@ -9,6 +7,10 @@ import { isBeforeToday, toPrintDate } from 'lib/utils'; import Image from 'next/image'; import Link from 'next/link'; import { Button } from 'components/ui'; +import dynamic from 'next/dynamic'; + +const OrderConfirmation = dynamic(() => import('components/orders/order-confirmation')); +const ActivateWarranty = dynamic(() => import('components/orders/activate-warranty')); export default async function AccountPage() { const orders = await getCustomerOrders();