forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_app.js
More file actions
46 lines (40 loc) · 1.2 KB
/
_app.js
File metadata and controls
46 lines (40 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React from 'react';
import App, { Container } from 'next/app';
import Head from 'next/head';
import { ThemeProvider } from 'styled-components';
import theme from '@codesandbox/common/lib/theme';
import Navigation from '@codesandbox/common/lib/components/Navigation';
import Footer from '@codesandbox/common/lib/components/Footer';
import '../css/typography.css';
import '../css/global.css';
export default class MyApp extends App {
static async getInitialProps({ Component, ctx }) {
let pageProps = {};
if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx);
}
return { pageProps };
}
render() {
const { Component, pageProps } = this.props;
return (
<ThemeProvider theme={theme}>
<>
<Head>
<title>
CodeSandbox: Online Code Editor Tailored for Web Application
Development
</title>
</Head>
<div style={{ position: 'absolute', left: 0, right: 0, zIndex: 20 }}>
<Navigation />
</div>
<Container>
<Component {...pageProps} />
</Container>
<Footer />
</>
</ThemeProvider>
);
}
}