use eitherx to implement index page boundary (#805)

main
Michael Fix 5 years ago committed by GitHub
parent 4e3f12c05f
commit e82e95c093
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -31,6 +31,7 @@
"dom-to-image": "^2.5.2", "dom-to-image": "^2.5.2",
"downshift": "^3.2.10", "downshift": "^3.2.10",
"dropperx": "^1.0.1", "dropperx": "^1.0.1",
"eitherx": "^1.0.2",
"escape-goat": "^2.1.0", "escape-goat": "^2.1.0",
"graphql": "^14.3.1", "graphql": "^14.3.1",
"highlight.js": "^9.15.8", "highlight.js": "^9.15.8",

@ -3,6 +3,7 @@ import React from 'react'
import { withRouter } from 'next/router' import { withRouter } from 'next/router'
import { register, unregister } from 'next-offline/runtime' import { register, unregister } from 'next-offline/runtime'
import debounce from 'lodash.debounce' import debounce from 'lodash.debounce'
import Either from 'eitherx'
// Ours // Ours
import EditorContainer from '../components/EditorContainer' import EditorContainer from '../components/EditorContainer'
@ -44,11 +45,20 @@ class Index extends React.Component {
return ( return (
<Page enableHeroText={true}> <Page enableHeroText={true}>
<MetaLinks /> <MetaLinks />
<Either>
<EditorContainer <EditorContainer
router={this.props.router} router={this.props.router}
onUpdate={this.onEditorUpdate} onUpdate={this.onEditorUpdate}
onReset={onReset} onReset={onReset}
/> />
<p>
An unexpected error has occurred. Please{' '}
<u>
<a href="https://github.com/dawnlabs/carbon">file an issue here</a>
</u>
.
</p>
</Either>
</Page> </Page>
) )
} }

@ -3203,6 +3203,11 @@ ee-first@1.1.1:
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
eitherx@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/eitherx/-/eitherx-1.0.2.tgz#f4659f3621e2b60787afa31e7d0467587ef890f2"
integrity sha512-A3S4t6mtsEJZMNIwjYvZiaGf5rxY0ITViHW9hULTAtcYlQyckznxq9q6wEGJu3GGFLftO89yq2Lx1qzg00VJkw==
electron-to-chromium@^1.3.164: electron-to-chromium@^1.3.164:
version "1.3.185" version "1.3.185"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.185.tgz#36368514eb719632a91435f3c9f57c98b47d81de" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.185.tgz#36368514eb719632a91435f3c9f57c98b47d81de"

Loading…
Cancel
Save