import Head from 'next/head' import { useRouter } from 'next/router' import siteMetadata from '@/data/siteMetadata' export const PageSeo = ({ title, description }) => { const router = useRouter() return ( {`${title}`} ) } export const BlogSeo = ({ title, summary, date, lastmod, images = [] }) => { const router = useRouter() const publishedAt = new Date(date).toISOString() const modifiedAt = new Date(lastmod || date).toISOString() let imagesArr = images.length === 0 ? [siteMetadata.socialBanner] : typeof images === 'string' ? [images] : images const featuredImages = imagesArr.map((img) => { return { url: `${siteMetadata.siteUrl}${img}`, alt: title, } }) return ( <> {`${title}`} {featuredImages.map((img) => ( ))} {date && } {lastmod && } ) }