text: import App, { Container } from 'next/app';
  import { ApolloProvider } from 'react-apollo';
  import withData from '../lib/withData';
  
  // ? this is boilerplate code that can be found in the docs for next.js
  
  class GitHubSearch extends App {
    static async getInitialProps({ Component, ctx }) {
      let pageProps = {};
      if (Component.getInitialProps) {
        pageProps = await Component.getInitialProps(ctx);
      }
      pageProps.query = ctx.query;
      return { pageProps };
    }
  
    render() {
      const { Component, apollo, pageProps } = this.props;
  
      return (
        <Container>
          <ApolloProvider client={apollo}>
            <Component {...pageProps} />
          </ApolloProvider>
        </Container>
      );
    }
  }
  
  export default withData(GitHubSearch);
  