From f99e0aba70efad0deb907d8e27f09fc9f527c8a4 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 17 Feb 2023 17:07:50 +0700
Subject: Refactor

---
 src/pages/shop/search.jsx | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 src/pages/shop/search.jsx

(limited to 'src/pages/shop/search.jsx')

diff --git a/src/pages/shop/search.jsx b/src/pages/shop/search.jsx
new file mode 100644
index 00000000..e86b1f4e
--- /dev/null
+++ b/src/pages/shop/search.jsx
@@ -0,0 +1,19 @@
+import BasicLayout from "@/core/components/layouts/BasicLayout"
+import ProductSearch from "@/lib/product/components/ProductSearch"
+import { useRouter } from "next/router"
+import _ from "lodash-contrib"
+
+export default function Search() {
+  const router = useRouter()
+  
+  return (
+    <BasicLayout>
+      { !_.isEmpty(router.query) && (
+        <ProductSearch
+          query={router.query}
+          prefixUrl="/shop/search"
+        />
+      ) }
+    </BasicLayout>
+  )
+}
\ No newline at end of file
-- 
cgit v1.2.3


From 69f55de26319e570ce0a8c4dbe8a29cb0d0b51c5 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Sat, 18 Feb 2023 22:03:55 +0700
Subject: optimization

---
 src/pages/shop/search.jsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/pages/shop/search.jsx')

diff --git a/src/pages/shop/search.jsx b/src/pages/shop/search.jsx
index e86b1f4e..a41c3b5f 100644
--- a/src/pages/shop/search.jsx
+++ b/src/pages/shop/search.jsx
@@ -1,8 +1,10 @@
-import BasicLayout from "@/core/components/layouts/BasicLayout"
-import ProductSearch from "@/lib/product/components/ProductSearch"
+import dynamic from "next/dynamic"
 import { useRouter } from "next/router"
 import _ from "lodash-contrib"
 
+const BasicLayout = dynamic(() => import("@/core/components/layouts/BasicLayout"))
+const ProductSearch = dynamic(() => import("@/lib/product/components/ProductSearch"))
+
 export default function Search() {
   const router = useRouter()
   
-- 
cgit v1.2.3


From f66b12fd1d0b83af0d7230d7b1565fbe00afbe3c Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 22 Feb 2023 11:03:34 +0700
Subject: prettier

---
 src/pages/shop/search.jsx | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

(limited to 'src/pages/shop/search.jsx')

diff --git a/src/pages/shop/search.jsx b/src/pages/shop/search.jsx
index a41c3b5f..d616f2dd 100644
--- a/src/pages/shop/search.jsx
+++ b/src/pages/shop/search.jsx
@@ -1,21 +1,16 @@
-import dynamic from "next/dynamic"
-import { useRouter } from "next/router"
-import _ from "lodash-contrib"
+import dynamic from 'next/dynamic'
+import { useRouter } from 'next/router'
+import _ from 'lodash-contrib'
 
-const BasicLayout = dynamic(() => import("@/core/components/layouts/BasicLayout"))
-const ProductSearch = dynamic(() => import("@/lib/product/components/ProductSearch"))
+const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout'))
+const ProductSearch = dynamic(() => import('@/lib/product/components/ProductSearch'))
 
 export default function Search() {
   const router = useRouter()
-  
+
   return (
     <BasicLayout>
-      { !_.isEmpty(router.query) && (
-        <ProductSearch
-          query={router.query}
-          prefixUrl="/shop/search"
-        />
-      ) }
+      {!_.isEmpty(router.query) && <ProductSearch query={router.query} prefixUrl='/shop/search' />}
     </BasicLayout>
   )
-}
\ No newline at end of file
+}
-- 
cgit v1.2.3


From ac3fdf7be9982e65d8f83a20bc487f8dd62e3bfc Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 22 Feb 2023 23:36:47 +0700
Subject: fix

---
 src/pages/shop/search.jsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'src/pages/shop/search.jsx')

diff --git a/src/pages/shop/search.jsx b/src/pages/shop/search.jsx
index d616f2dd..345b715a 100644
--- a/src/pages/shop/search.jsx
+++ b/src/pages/shop/search.jsx
@@ -10,7 +10,12 @@ export default function Search() {
 
   return (
     <BasicLayout>
-      {!_.isEmpty(router.query) && <ProductSearch query={router.query} prefixUrl='/shop/search' />}
+      {!_.isEmpty(router.query) && (
+        <ProductSearch
+          query={router.query}
+          prefixUrl='/shop/search'
+        />
+      )}
     </BasicLayout>
   )
 }
-- 
cgit v1.2.3

