chore: add seo head and fix env

This commit is contained in:
AP 2020-04-14 08:46:59 +02:00
parent 00c78513ec
commit 7c900be4d0
2 changed files with 24 additions and 12 deletions

View File

@ -1,12 +1,8 @@
const dotEnvResult = require('dotenv').config(); require('dotenv').config();
const withBundleAnalyzer = require('@next/bundle-analyzer')({ const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true', enabled: process.env.ANALYZE === 'true',
}); });
if (dotEnvResult.error) {
throw dotEnvResult.error;
}
module.exports = withBundleAnalyzer({ module.exports = withBundleAnalyzer({
poweredByHeader: false, poweredByHeader: false,
assetPrefix: process.env.BASE_PATH || '', assetPrefix: process.env.BASE_PATH || '',

View File

@ -22,6 +22,7 @@ import {
import { toast } from 'react-toastify'; import { toast } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css'; import 'react-toastify/dist/ReactToastify.css';
import '../src/styles/FontStyles.css'; import '../src/styles/FontStyles.css';
import Head from 'next/head';
toast.configure({ draggable: false }); toast.configure({ draggable: false });
@ -65,13 +66,28 @@ class MyApp extends App<any> {
render() { render() {
const { Component, pageProps, apollo } = this.props; const { Component, pageProps, apollo } = this.props;
return ( return (
<ApolloProvider client={apollo}> <>
<ContextProvider> <Head>
<Wrapper> <title>ThunderHub - Lightning Node Manager</title>
<Component {...pageProps} /> <meta
</Wrapper> name="viewport"
</ContextProvider> content="initial-scale=1.0, width=device-width"
</ApolloProvider> key="viewport"
/>
<meta
name="description"
content="Manage and monitor your lightning network node right inside your browser"
key="description"
/>
</Head>
<ApolloProvider client={apollo}>
<ContextProvider>
<Wrapper>
<Component {...pageProps} />
</Wrapper>
</ContextProvider>
</ApolloProvider>
</>
); );
} }
} }