Skip to content

Commit

Permalink
Add _app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kheruc committed Sep 9, 2019
1 parent 1805dff commit 8693430
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pages/_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import App from 'next/app';
import MainLayout from '../components/layouts/main';
import DefaultLayout from '../components/layouts/default';

class MyApp extends App {
render() {
const { Component, pageProps } = this.props;
const Layout = Component.Layout || DefaultLayout;

return (
<MainLayout>
<Layout>
<Component {...pageProps} />
</Layout>
</MainLayout>
);
}
}

export default MyApp;

0 comments on commit 8693430

Please sign in to comment.