ipfs/src/Layout.tsx

45 lines
949 B
TypeScript
Raw Normal View History

2019-10-17 12:35:28 +02:00
import React, { ReactNode } from 'react'
2019-10-17 00:13:54 +02:00
import Head from 'next/head'
2019-10-17 14:15:39 +02:00
import { NextSeo } from 'next-seo'
2019-10-17 00:13:54 +02:00
import Footer from './components/Footer'
import styles from './Layout.module.css'
2019-10-17 14:15:39 +02:00
import { title, description, url } from '../site.config'
2019-10-17 00:13:54 +02:00
export default function Layout({
children,
pageTitle = title
}: {
2019-10-17 12:35:28 +02:00
children: ReactNode
2019-10-17 00:13:54 +02:00
pageTitle?: string
}) {
return (
<div className={styles.app}>
<Head>
<link rel="icon" href="/favicon.ico" />
</Head>
2019-10-17 14:15:39 +02:00
<NextSeo
title={pageTitle}
description={description}
canonical={url}
openGraph={{
url,
title,
description,
images: [{ url: `${url}/share.png` }],
site_name: title
}}
twitter={{
handle: '@oceanprotocol',
site: '@oceanprotocol',
cardType: 'summary_large_image'
}}
/>
2019-10-17 00:13:54 +02:00
{children}
<Footer />
</div>
)
}