Created
May 5, 2020 00:01
-
-
Save ryanbelke/07308115af9dbe209ff1052d005f9e36 to your computer and use it in GitHub Desktop.
_app.js to use withData
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* _app.js */ | |
| import React from "react"; | |
| import App from "next/app"; | |
| import Head from "next/head"; | |
| import Layout from "../components/Layout"; | |
| import withData from "../lib/apollo"; | |
| class MyApp extends App { | |
| render() { | |
| const { Component, pageProps } = this.props; | |
| return ( | |
| <> | |
| <Head> | |
| <link | |
| rel="stylesheet" | |
| href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" | |
| integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" | |
| crossOrigin="anonymous" | |
| /> | |
| </Head> | |
| <Layout> | |
| <Component {...pageProps} /> | |
| </Layout> | |
| </> | |
| ); | |
| } | |
| } | |
| export default withData(MyApp); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment