From 6e816fba49e020bfdc3f1ffa10183b585e87d9c1 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Thu, 4 May 2023 15:38:40 +0700
Subject: optimizing performance

---
 src/pages/blog/index.jsx | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

(limited to 'src/pages/blog/index.jsx')

diff --git a/src/pages/blog/index.jsx b/src/pages/blog/index.jsx
index c65fe07d..17446935 100644
--- a/src/pages/blog/index.jsx
+++ b/src/pages/blog/index.jsx
@@ -1,12 +1,14 @@
-import BasicLayout from '@/core/components/layouts/BasicLayout'
 import Link from 'next/link'
+import { useRouter } from 'next/router'
 import { createSlug } from '@/core/utils/slug'
-import Image from '@/core/components/elements/Image/Image'
 import useBlogs from '@/lib/blog/hooks/useBlogs'
-import { useRouter } from 'next/router'
-import Pagination from '@/core/components/elements/Pagination/Pagination'
-import Spinner from '@/core/components/elements/Spinner/Spinner'
 import Seo from '@/core/components/Seo'
+import dynamic from 'next/dynamic'
+
+const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout'))
+const Pagination = dynamic(() => import('@/core/components/elements/Pagination/Pagination'))
+const Spinner = dynamic(() => import('@/core/components/elements/Spinner/Spinner'))
+const Image = dynamic(() => import('@/core/components/elements/Image/Image'))
 
 export default function Blogs() {
   const router = useRouter()
-- 
cgit v1.2.3

