chore: small fixes

This commit is contained in:
AP 2020-04-15 14:52:10 +02:00
parent c0e1ab6613
commit 1c86a6d453
3 changed files with 19 additions and 12 deletions

View file

@ -21,6 +21,7 @@ import {
} from '../src/components/stateViews/StateCards'; } from '../src/components/stateViews/StateCards';
import { toast } from 'react-toastify'; import { toast } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css'; import 'react-toastify/dist/ReactToastify.css';
import Head from 'next/head';
toast.configure({ draggable: false }); toast.configure({ draggable: false });
@ -64,13 +65,18 @@ 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} /> </Head>
</Wrapper> <ApolloProvider client={apollo}>
</ContextProvider> <ContextProvider>
</ApolloProvider> <Wrapper>
<Component {...pageProps} />
</Wrapper>
</ContextProvider>
</ApolloProvider>
</>
); );
} }
} }

View file

@ -37,7 +37,6 @@ export default class MyDocument extends Document {
return ( return (
<Html> <Html>
<Head> <Head>
<title>ThunderHub - Lightning Node Manager</title>
<meta <meta
name="viewport" name="viewport"
content="initial-scale=1.0, width=device-width" content="initial-scale=1.0, width=device-width"

View file

@ -77,11 +77,13 @@ export const Link = ({
); );
} }
const linkProps = {
href: `${basePath}${to}`,
...(basePath !== '' ? { prefetch: false } : {}),
};
return ( return (
<RouterLink <RouterLink {...linkProps}>
href={`${basePath}${to}`}
prefetch={basePath === '' ? true : false}
>
<CorrectLink {...props}>{children}</CorrectLink> <CorrectLink {...props}>{children}</CorrectLink>
</RouterLink> </RouterLink>
); );