diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2023-12-05 02:59:30 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2023-12-05 02:59:30 +0000 |
| commit | 80caa8f6ad5fecc213fd1533b972c6173102721e (patch) | |
| tree | f70c8ec03cf2a1cdb8eb3f30ecd83e200986b70b /src-migrate/common/components | |
| parent | eca358fd93f1ea5d88c6a6fcc315624cc3bbb910 (diff) | |
| parent | 4ac372ff318ee78e5d5019a1dbe95bf47b661766 (diff) | |
Merged in Feature/popup_information (pull request #118)
Feature/popup information
Diffstat (limited to 'src-migrate/common/components')
| -rw-r--r-- | src-migrate/common/components/elements/Seo.tsx | 34 |
1 files changed, 34 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 |
