Created
May 4, 2020 00:09
-
-
Save ryanbelke/62e28befa9043b0678a1565af7417da3 to your computer and use it in GitHub Desktop.
_app.js to use Layout component
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"; | |
| export default 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> | |
| </> | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment