From 72329fb20c3bc7703590b85bd0c42ea32e7cfe61 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 29 Mar 2023 17:02:57 +0700
Subject: SEO

---
 src/core/components/Seo.jsx | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

(limited to 'src/core/components/Seo.jsx')

diff --git a/src/core/components/Seo.jsx b/src/core/components/Seo.jsx
index e688077e..0e224c19 100644
--- a/src/core/components/Seo.jsx
+++ b/src/core/components/Seo.jsx
@@ -1,10 +1,33 @@
-import Head from 'next/head'
+import { NextSeo } from 'next-seo'
+import { useRouter } from 'next/router'
+
+const Seo = ({ ...props }) => {
+  const router = useRouter()
+
+  const { additionalMetaTags = [], openGraph = [], title = '' } = props
 
-const Seo = ({ title }) => {
   return (
-    <Head>
-      <title>{title}</title>
-    </Head>
+    <NextSeo
+      defaultTitle='Indoteknik.com: B2B Industrial Supply & Solution'
+      canonical={process.env.NEXT_PUBLIC_SELF_HOST + router.asPath}
+      description={title}
+      {...props}
+      openGraph={{
+        siteName: 'Indoteknik.com',
+        ...openGraph
+      }}
+      additionalMetaTags={[
+        {
+          property: 'fb:app_id',
+          content: '270830718811'
+        },
+        {
+          property: 'fb:page_id',
+          content: '101759953569'
+        },
+        ...additionalMetaTags
+      ]}
+    />
   )
 }
 
-- 
cgit v1.2.3

