diff options
Diffstat (limited to 'src-migrate')
| -rw-r--r-- | src-migrate/common/components/elements/Seo.tsx | 34 | ||||
| -rw-r--r-- | src-migrate/pages/register.tsx | 2 |
2 files changed, 36 insertions, 0 deletions
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 diff --git a/src-migrate/pages/register.tsx b/src-migrate/pages/register.tsx index bd5c37f4..1246c6f5 100644 --- a/src-migrate/pages/register.tsx +++ b/src-migrate/pages/register.tsx @@ -1,6 +1,7 @@ import BasicLayout from "@/core/components/layouts/BasicLayout" import { useWindowSize } from "usehooks-ts" +import Seo from "~/common/components/elements/Seo" import Register from "~/modules/register" const RegisterPage = () => { @@ -10,6 +11,7 @@ const RegisterPage = () => { return ( <Layout> + <Seo title="Register - Indoteknik.com" /> <Register /> </Layout> ) |
