You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
carbon/pages/index.js

42 lines
972 B
JavaScript

// Theirs
import React from 'react'
import { withRouter } from 'next/router'
import { register, unregister } from 'next-offline/runtime'
import Either from 'eitherx'
// Ours
import EditorContainer from '../components/EditorContainer'
import Page from '../components/Page'
6 years ago
import { MetaLinks } from '../components/Meta'
class Index extends React.Component {
componentDidMount() {
register()
}
componentWillUnmount() {
unregister()
}
shouldComponentUpdate = () => false
render() {
return (
<Page enableHeroText={true}>
6 years ago
<MetaLinks />
<Either>
<EditorContainer router={this.props.router} snippet={this.props.snippet} />
<p>
An unexpected error has occurred. Please{' '}
<u>
<a href="https://github.com/carbon-app/carbon">file an issue here</a>
</u>
.
</p>
</Either>
</Page>
)
}
}
export default withRouter(Index)