From 8a5825d52271d712ec7c8348447d433067e13ef2 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Thu, 13 Sep 2018 14:18:56 -0400 Subject: DONE --- stepped-solutions/FINISHED/frontend/pages/_app.js | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 stepped-solutions/FINISHED/frontend/pages/_app.js (limited to 'stepped-solutions/FINISHED/frontend/pages/_app.js') diff --git a/stepped-solutions/FINISHED/frontend/pages/_app.js b/stepped-solutions/FINISHED/frontend/pages/_app.js new file mode 100644 index 0000000..fc03876 --- /dev/null +++ b/stepped-solutions/FINISHED/frontend/pages/_app.js @@ -0,0 +1,31 @@ +import App, { Container } from 'next/app'; +import Page from '../components/Page'; +import { ApolloProvider } from 'react-apollo'; +import withData from '../lib/withData'; + +class MyApp extends App { + static async getInitialProps({ Component, ctx }) { + let pageProps = {}; + if (Component.getInitialProps) { + pageProps = await Component.getInitialProps(ctx); + } + // this exposes the query to the user + pageProps.query = ctx.query; + return { pageProps }; + } + render() { + const { Component, apollo, pageProps } = this.props; + + return ( + + + + + + + + ); + } +} + +export default withData(MyApp); -- cgit v1.3