Unverified Commit 29919976 authored by Pavel Ševčík's avatar Pavel Ševčík
Browse files

Move Layout to _app.tsx

parent e24e1134
import React from "react"; import React from "react";
import Head from "next/head"; import Head from "next/head";
import { Layout } from "../components/Layout";
import "../css/materialize.css"; import "../css/materialize.css";
import "../css/defaults.css"; import "../css/defaults.css";
import "../css/style.css"; import "../css/style.css";
...@@ -10,7 +12,7 @@ const description = ...@@ -10,7 +12,7 @@ const description =
const MyApp = ({ Component, pageProps }) => { const MyApp = ({ Component, pageProps }) => {
return ( return (
<> <Layout>
<Head> <Head>
<meta charSet="UTF-8" /> <meta charSet="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
...@@ -46,7 +48,7 @@ const MyApp = ({ Component, pageProps }) => { ...@@ -46,7 +48,7 @@ const MyApp = ({ Component, pageProps }) => {
<link rel="manifest" href="/assets/site.webmanifest" /> <link rel="manifest" href="/assets/site.webmanifest" />
</Head> </Head>
<Component {...pageProps} /> <Component {...pageProps} />
</> </Layout>
); );
}; };
......
import React from "react"; import React from "react";
import Document, { Html, Head, Main, NextScript } from "next/document"; import Document, { Html, Head, Main, NextScript } from "next/document";
import { Layout } from "../components/Layout";
class MyDocument extends Document { class MyDocument extends Document {
static async getInitialProps(ctx) { static async getInitialProps(ctx) {
...@@ -13,9 +12,7 @@ class MyDocument extends Document { ...@@ -13,9 +12,7 @@ class MyDocument extends Document {
<Html lang="en"> <Html lang="en">
<Head /> <Head />
<body> <body>
<Layout> <Main />
<Main />
</Layout>
<NextScript /> <NextScript />
</body> </body>
</Html> </Html>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment