diff options
author | 2018-12-09 13:24:17 +0100 | |
---|---|---|
committer | 2018-12-09 13:24:17 +0100 | |
commit | 898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de (patch) | |
tree | 9816c013f9a9453dae07d9dd8d4a862c77c23064 /src/components/settings/SettingsLayout.js | |
parent | Upgrade to react 16 (diff) | |
download | ferdium-app-898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de.tar.gz ferdium-app-898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de.tar.zst ferdium-app-898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de.zip |
Add React 16 didCatch/ErrorBoundary component
Diffstat (limited to 'src/components/settings/SettingsLayout.js')
-rw-r--r-- | src/components/settings/SettingsLayout.js | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/components/settings/SettingsLayout.js b/src/components/settings/SettingsLayout.js index 3cb08feb1..d5d8f0bb0 100644 --- a/src/components/settings/SettingsLayout.js +++ b/src/components/settings/SettingsLayout.js | |||
@@ -2,6 +2,7 @@ import React, { Component } from 'react'; | |||
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer } from 'mobx-react'; | 3 | import { observer } from 'mobx-react'; |
4 | 4 | ||
5 | import ErrorBoundary from '../util/ErrorBoundary'; | ||
5 | import { oneOrManyChildElements } from '../../prop-types'; | 6 | import { oneOrManyChildElements } from '../../prop-types'; |
6 | import Appear from '../ui/effects/Appear'; | 7 | import Appear from '../ui/effects/Appear'; |
7 | 8 | ||
@@ -36,18 +37,20 @@ export default @observer class SettingsLayout extends Component { | |||
36 | return ( | 37 | return ( |
37 | <Appear transitionName="fadeIn-fast"> | 38 | <Appear transitionName="fadeIn-fast"> |
38 | <div className="settings-wrapper"> | 39 | <div className="settings-wrapper"> |
39 | <button | 40 | <ErrorBoundary> |
40 | className="settings-wrapper__action" | ||
41 | onClick={closeSettings} | ||
42 | /> | ||
43 | <div className="settings franz-form"> | ||
44 | {navigation} | ||
45 | {children} | ||
46 | <button | 41 | <button |
47 | className="settings__close mdi mdi-close" | 42 | className="settings-wrapper__action" |
48 | onClick={closeSettings} | 43 | onClick={closeSettings} |
49 | /> | 44 | /> |
50 | </div> | 45 | <div className="settings franz-form"> |
46 | {navigation} | ||
47 | {children} | ||
48 | <button | ||
49 | className="settings__close mdi mdi-close" | ||
50 | onClick={closeSettings} | ||
51 | /> | ||
52 | </div> | ||
53 | </ErrorBoundary> | ||
51 | </div> | 54 | </div> |
52 | </Appear> | 55 | </Appear> |
53 | ); | 56 | ); |