-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_app.js
More file actions
37 lines (29 loc) · 771 Bytes
/
_app.js
File metadata and controls
37 lines (29 loc) · 771 Bytes
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
import React from "react";
import App, { Container } from "next/app";
import { hotjar } from "react-hotjar";
import { ThemeProvider } from "styled-components";
import { GlobalStyles, theme } from "../styles";
class HackSC extends App {
static async getInitialProps({ Component, ctx }) {
let pageProps = {};
if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx);
}
return { pageProps };
}
componentDidMount() {
hotjar.initialize("1547187");
}
render() {
const { Component, pageProps } = this.props;
return (
<ThemeProvider theme={theme}>
<>
<GlobalStyles />
<Component {...pageProps} />
</>
</ThemeProvider>
);
}
}
export default HackSC;