import Head from "next/head"; import { useRouter } from "next/router"; import { SITE_NAME, SITE_DESCRIPTION, SITE_URL, TWITTER_USER_NAME } from "@constants/seo/seo-variables"; type Meta = { title?: string | null; description?: string | null; image?: string | null; url?: string | null; }; type Props = { meta: Meta; children: React.ReactNode; }; const PageSeo = ({ meta, children }: Props) => { const router = useRouter(); const image = meta.image || "/site-image.png"; const title = meta.title || SITE_NAME; const url = meta.url || `${SITE_URL}${router.asPath}`; const description = meta.description || SITE_DESCRIPTION; return ( <> {title} {/* */} {image && ( )} {children} ); }; export default PageSeo;