summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-05-03 16:39:46 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-05-03 16:39:46 +0700
commit992c7415988cc76338c991731f21d225e5330fa5 (patch)
tree4942a12ef19ee3b1adf6796248508058fc23b2d8
parent5a99be42830e81d104c48c98104fbcabfc23a445 (diff)
fix layout content
-rw-r--r--src/core/components/layouts/BasicLayout.jsx2
-rw-r--r--src/core/utils/whatsappUrl.js2
-rw-r--r--src/lib/content/components/PageContent.jsx6
-rw-r--r--src/lib/product/components/ProductSearch.jsx8
-rw-r--r--src/pages/hubungi-kami.jsx5
-rw-r--r--src/pages/informasi-garansi.jsx5
-rw-r--r--src/pages/karir.jsx5
-rw-r--r--src/pages/kebijakan-privasi.jsx5
-rw-r--r--src/pages/metode-pembayaran.jsx5
-rw-r--r--src/pages/metode-pengiriman.jsx5
-rw-r--r--src/pages/panduan-belanja.jsx5
-rw-r--r--src/pages/panduan-pick-up-service.jsx5
-rw-r--r--src/pages/panduan-quotation.jsx5
-rw-r--r--src/pages/pelanggan-kami.jsx5
-rw-r--r--src/pages/pengembalian-barang-dana.jsx5
-rw-r--r--src/pages/syarat-ketentuan.jsx5
16 files changed, 59 insertions, 19 deletions
diff --git a/src/core/components/layouts/BasicLayout.jsx b/src/core/components/layouts/BasicLayout.jsx
index ae4c3eaa..df42e403 100644
--- a/src/core/components/layouts/BasicLayout.jsx
+++ b/src/core/components/layouts/BasicLayout.jsx
@@ -14,7 +14,7 @@ const BasicLayout = ({ children }) => {
{children}
<div className='fixed bottom-4 right-4 sm:bottom-10 sm:right-8 z-50'>
<a
- href={whatsappUrl()}
+ href={whatsappUrl(null)}
className='py-2 pl-3 pr-4 rounded-full bg-[#4FB84A] border border-green-300 flex items-center'
>
<Image
diff --git a/src/core/utils/whatsappUrl.js b/src/core/utils/whatsappUrl.js
index 696e01d8..6ca9722b 100644
--- a/src/core/utils/whatsappUrl.js
+++ b/src/core/utils/whatsappUrl.js
@@ -11,6 +11,8 @@ const whatsappUrl = (template = 'default', payload) => {
case 'productSearch':
text = `Saya lagi cari-cari produk ${payload.name}, bisa bantu saya cari produknya?`
break
+ case null:
+ break;
default:
text = 'Halo, saya mau tanya-tanya seputar produk, bisa tolong bantu saya?'
break
diff --git a/src/lib/content/components/PageContent.jsx b/src/lib/content/components/PageContent.jsx
index a2fcde4e..1d6b046f 100644
--- a/src/lib/content/components/PageContent.jsx
+++ b/src/lib/content/components/PageContent.jsx
@@ -33,11 +33,7 @@ const PageContent = ({ path }) => {
prose-hr:my-3
`
- return (
- <article className='container mx-auto'>
- <div className={contentClassNames} dangerouslySetInnerHTML={{ __html: parsedContent }} />
- </article>
- )
+ return <div className={contentClassNames} dangerouslySetInnerHTML={{ __html: parsedContent }} />
}
return <></>
diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx
index 2233925d..cc85589d 100644
--- a/src/lib/product/components/ProductSearch.jsx
+++ b/src/lib/product/components/ProductSearch.jsx
@@ -14,6 +14,7 @@ import ProductFilterDesktop from './ProductFilterDesktop'
import { useRouter } from 'next/router'
import searchSpellApi from '@/core/api/searchSpellApi'
import Link from '@/core/components/elements/Link/Link'
+import whatsappUrl from '@/core/utils/whatsappUrl'
const ProductSearch = ({ query, prefixUrl, defaultBrand = null }) => {
const router = useRouter()
@@ -246,7 +247,12 @@ const ProductSearch = ({ query, prefixUrl, defaultBrand = null }) => {
<div className='text-gray_r-12/90'>
<span>
Barang yang anda cari tidak ada?{' '}
- <a href='#' className='text-danger-500'>
+ <a
+ href={whatsappUrl('productSearch', {
+ name: query.q
+ })}
+ className='text-danger-500'
+ >
Hubungi Kami
</a>
</span>
diff --git a/src/pages/hubungi-kami.jsx b/src/pages/hubungi-kami.jsx
index 7aba9cba..79934f8f 100644
--- a/src/pages/hubungi-kami.jsx
+++ b/src/pages/hubungi-kami.jsx
@@ -6,7 +6,10 @@ export default function HubungiKami() {
return (
<BasicLayout>
<Seo title='Hubungi Kami - Indoteknik.com' />
- <PageContent path='/hubungi-kami' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/hubungi-kami' />
+ </article>
</BasicLayout>
)
}
diff --git a/src/pages/informasi-garansi.jsx b/src/pages/informasi-garansi.jsx
index 191c2b42..8346bf35 100644
--- a/src/pages/informasi-garansi.jsx
+++ b/src/pages/informasi-garansi.jsx
@@ -6,7 +6,10 @@ export default function InformasiGaransi() {
return (
<BasicLayout>
<Seo title='Informasi Garansi - Indoteknik.com' />
- <PageContent path='/informasi-garansi' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/informasi-garansi' />
+ </article>
</BasicLayout>
)
}
diff --git a/src/pages/karir.jsx b/src/pages/karir.jsx
index 297c3015..01326dd5 100644
--- a/src/pages/karir.jsx
+++ b/src/pages/karir.jsx
@@ -6,7 +6,10 @@ export default function KebijakanPrivasi() {
return (
<BasicLayout>
<Seo title='Karir - Indoteknik.com' />
- <PageContent path='/karir' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/karir' />
+ </article>
</BasicLayout>
)
}
diff --git a/src/pages/kebijakan-privasi.jsx b/src/pages/kebijakan-privasi.jsx
index 10213f21..746014d8 100644
--- a/src/pages/kebijakan-privasi.jsx
+++ b/src/pages/kebijakan-privasi.jsx
@@ -6,7 +6,10 @@ export default function KebijakanPrivasi() {
return (
<BasicLayout>
<Seo title='Kebijakan Privasi - Indoteknik.com' />
- <PageContent path='/kebijakan-privasi' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/kebijakan-privasi' />
+ </article>
</BasicLayout>
)
}
diff --git a/src/pages/metode-pembayaran.jsx b/src/pages/metode-pembayaran.jsx
index 8e0394bf..c2778bb1 100644
--- a/src/pages/metode-pembayaran.jsx
+++ b/src/pages/metode-pembayaran.jsx
@@ -6,7 +6,10 @@ export default function MetodePembayaran() {
return (
<BasicLayout>
<Seo title='Metode Pembayaran - Indoteknik.com' />
- <PageContent path='/metode-pembayaran' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/metode-pembayaran' />
+ </article>
</BasicLayout>
)
}
diff --git a/src/pages/metode-pengiriman.jsx b/src/pages/metode-pengiriman.jsx
index b6555cde..a544b751 100644
--- a/src/pages/metode-pengiriman.jsx
+++ b/src/pages/metode-pengiriman.jsx
@@ -6,7 +6,10 @@ export default function MetodePengiriman() {
return (
<BasicLayout>
<Seo title='Metode Pengiriman - Indoteknik.com' />
- <PageContent path='/metode-pengiriman' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/metode-pengiriman' />
+ </article>
</BasicLayout>
)
}
diff --git a/src/pages/panduan-belanja.jsx b/src/pages/panduan-belanja.jsx
index a792bf10..3b8b85b1 100644
--- a/src/pages/panduan-belanja.jsx
+++ b/src/pages/panduan-belanja.jsx
@@ -6,7 +6,10 @@ export default function PanduanBelanja() {
return (
<BasicLayout>
<Seo title='Panduan Belanja - Indoteknik.com' />
- <PageContent path='/panduan-belanja' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/panduan-belanja' />
+ </article>
</BasicLayout>
)
}
diff --git a/src/pages/panduan-pick-up-service.jsx b/src/pages/panduan-pick-up-service.jsx
index 8bc925d1..61e31a63 100644
--- a/src/pages/panduan-pick-up-service.jsx
+++ b/src/pages/panduan-pick-up-service.jsx
@@ -6,7 +6,10 @@ export default function PanduanPickUpService() {
return (
<BasicLayout>
<Seo title='Panduan Pick Up Service - Indoteknik.com' />
- <PageContent path='/panduan-pick-up-service' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/panduan-pick-up-service' />
+ </article>
</BasicLayout>
)
}
diff --git a/src/pages/panduan-quotation.jsx b/src/pages/panduan-quotation.jsx
index c67bfd84..6e20ac4f 100644
--- a/src/pages/panduan-quotation.jsx
+++ b/src/pages/panduan-quotation.jsx
@@ -6,7 +6,10 @@ export default function PanduanQuotation() {
return (
<BasicLayout>
<Seo title='Panduan Quotation - Indoteknik.com' />
- <PageContent path='/panduan-quotation' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/panduan-quotation' />
+ </article>
</BasicLayout>
)
}
diff --git a/src/pages/pelanggan-kami.jsx b/src/pages/pelanggan-kami.jsx
index 61a3ae03..33a5f94b 100644
--- a/src/pages/pelanggan-kami.jsx
+++ b/src/pages/pelanggan-kami.jsx
@@ -6,7 +6,10 @@ export default function PelangganKami() {
return (
<BasicLayout>
<Seo title='Pelanggan Kami - Indoteknik.com' />
- <PageContent path='/pelanggan-kami' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/pelanggan-kami' />
+ </article>
</BasicLayout>
)
}
diff --git a/src/pages/pengembalian-barang-dana.jsx b/src/pages/pengembalian-barang-dana.jsx
index fa4f9e05..210c9fa0 100644
--- a/src/pages/pengembalian-barang-dana.jsx
+++ b/src/pages/pengembalian-barang-dana.jsx
@@ -6,7 +6,10 @@ export default function PengembalianBarangDana() {
return (
<BasicLayout>
<Seo title='Pengembalian Barang & Dana - Indoteknik.com' />
- <PageContent path='/pengembalian-barang-dana' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/pengembalian-barang-dana' />
+ </article>
</BasicLayout>
)
}
diff --git a/src/pages/syarat-ketentuan.jsx b/src/pages/syarat-ketentuan.jsx
index 3064489a..114d09c4 100644
--- a/src/pages/syarat-ketentuan.jsx
+++ b/src/pages/syarat-ketentuan.jsx
@@ -6,7 +6,10 @@ export default function SyaratKetentuan() {
return (
<BasicLayout>
<Seo title='Syarat & Ketentuan - Indoteknik.com' />
- <PageContent path='/syarat-ketentuan' />
+
+ <article className='container mx-auto py-6'>
+ <PageContent path='/syarat-ketentuan' />
+ </article>
</BasicLayout>
)
}