Skip to content

Commit 064f1b6

Browse files
author
Ives van Hoorne
committed
Make layout a class
1 parent 68883b9 commit 064f1b6

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

packages/homepage/src/layouts/index.js

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,22 @@ import '../css/global.css';
88
import Navigation from '../components/Navigation';
99
import Footer from '../components/Footer';
1010

11-
const TemplateWrapper = ({ children }) => (
12-
<ThemeProvider theme={theme}>
13-
<div>
14-
<div style={{ position: 'absolute', left: 0, right: 0, zIndex: 20 }}>
15-
<Navigation />
16-
</div>
17-
<div style={{ maxWidth: '100vw', overflowX: 'hidden' }}>{children()}</div>
18-
<Footer />
19-
</div>
20-
</ThemeProvider>
21-
);
22-
23-
export default TemplateWrapper;
11+
// eslint-disable-next-line
12+
export default class TemplateWrapper extends React.Component {
13+
render() {
14+
const { children } = this.props;
15+
return (
16+
<ThemeProvider theme={theme}>
17+
<div>
18+
<div style={{ position: 'absolute', left: 0, right: 0, zIndex: 20 }}>
19+
<Navigation />
20+
</div>
21+
<div style={{ maxWidth: '100vw', overflowX: 'hidden' }}>
22+
{children()}
23+
</div>
24+
<Footer />
25+
</div>
26+
</ThemeProvider>
27+
);
28+
}
29+
}

0 commit comments

Comments
 (0)