From d3848251a01b2e35b3765e3660171cc085d76e18 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 21 Nov 2023 13:54:41 +0700
Subject: Add Seo component and use on register

---
 src-migrate/common/components/elements/Seo.tsx | 34 ++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 src-migrate/common/components/elements/Seo.tsx

(limited to 'src-migrate/common/components/elements/Seo.tsx')

diff --git a/src-migrate/common/components/elements/Seo.tsx b/src-migrate/common/components/elements/Seo.tsx
new file mode 100644
index 00000000..2245663a
--- /dev/null
+++ b/src-migrate/common/components/elements/Seo.tsx
@@ -0,0 +1,34 @@
+import { useRouter } from 'next/router'
+import React from 'react'
+import { NextSeo } from "next-seo"
+import { MetaTag, NextSeoProps } from 'next-seo/lib/types';
+
+const Seo = (props: NextSeoProps) => {
+  const router = useRouter()
+
+  const additionalMetaTags: MetaTag[] = [
+    {
+      property: 'fb:app_id',
+      content: '270830718811'
+    },
+    {
+      property: 'fb:page_id',
+      content: '101759953569'
+    },
+  ]
+
+  if (!!props.additionalMetaTags) additionalMetaTags.push(...props.additionalMetaTags)
+
+  return (
+    <NextSeo
+      defaultTitle='Indoteknik.com: B2B Industrial Supply & Solution'
+      canonical={process.env.NEXT_PUBLIC_SELF_HOST + router.asPath}
+      description={props.title}
+      {...props}
+      openGraph={{ siteName: 'Indoteknik.com', ...props.openGraph }}
+      additionalMetaTags={additionalMetaTags}
+    />
+  )
+}
+
+export default Seo
\ No newline at end of file
-- 
cgit v1.2.3

