import React, { useEffect } from 'react' import NextHead from 'next/head' type PropsType = { host: string icon?: string image?: string note?: string site: string stylesheets?: Array tags?: Array title: string twitterCreatorHandle?: string twitterHandle?: string url: string } export default function Head({ title, note, tags = [], url, icon, host, image, site, twitterHandle, twitterCreatorHandle, stylesheets, }: PropsType) { useEffect(() => { if (title) { document.title = title } }, [title]) return ( {title} {icon && ( )} {image && ( )} {/* */} {image && ( )} {Boolean(stylesheets?.length) && stylesheets?.map((href, i) => ( ))} ) }