From 41adb8957d56f9fb4a3f0b2c0442b95796fa8099 Mon Sep 17 00:00:00 2001 From: Henrik Larsson Date: Mon, 28 Aug 2023 14:58:16 +0200 Subject: [PATCH] Removed redundant use client directive from dynamic content manager and product-card --- .../dynamic-content-manager.tsx | 14 +++++++------- components/ui/product-card/product-card.tsx | 2 -- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/components/layout/dynamic-content-manager/dynamic-content-manager.tsx b/components/layout/dynamic-content-manager/dynamic-content-manager.tsx index 9740b4223..f729d7a24 100644 --- a/components/layout/dynamic-content-manager/dynamic-content-manager.tsx +++ b/components/layout/dynamic-content-manager/dynamic-content-manager.tsx @@ -1,12 +1,12 @@ -'use client'; +import dynamic from 'next/dynamic'; -import BlurbSection from '@/components/modules/blurb-section/blurb-section'; -import FilteredProductList from '@/components/modules/filtered-product-list/filtered-product-list'; -import Hero from '@/components/modules/hero'; -import ReusableSection from '@/components/modules/reusable-section/reusable-section'; -import Slider from '@/components/modules/slider/slider'; -import USPSection from '@/components/modules/usp-section/usp-section'; import { InformationCircleIcon } from '@heroicons/react/24/outline'; +import Hero from 'components/modules/hero'; +import ReusableSection from 'components/modules/reusable-section/reusable-section'; +const USPSection = dynamic(() => import('components/modules/usp-section')); +const Slider = dynamic(() => import('components/modules/slider')); +const BlurbSection = dynamic(() => import('components/modules/blurb-section')); +const FilteredProductList = dynamic(() => import('components/modules/filtered-product-list')); interface getContentComponentProps { _type: string; _key: number; diff --git a/components/ui/product-card/product-card.tsx b/components/ui/product-card/product-card.tsx index 861e59b69..c32018970 100644 --- a/components/ui/product-card/product-card.tsx +++ b/components/ui/product-card/product-card.tsx @@ -1,5 +1,3 @@ -'use client'; - import SanityImage from '@/components/ui/sanity-image/sanity-image'; import type { Product } from '@/lib/storm/product'; import Price from 'components/price';