diff options
author | 2021-09-03 04:34:02 +0200 | |
---|---|---|
committer | 2021-09-03 08:04:02 +0530 | |
commit | 8db37ba8a6ed7a1d66e5e3b805abd4ceb5762c00 (patch) | |
tree | ce5cdc60cf6c153e2b636115d42b093513abf650 /src/components/ui | |
parent | 5.6.1-nightly.48 [skip ci] (diff) | |
download | ferdium-app-8db37ba8a6ed7a1d66e5e3b805abd4ceb5762c00.tar.gz ferdium-app-8db37ba8a6ed7a1d66e5e3b805abd4ceb5762c00.tar.zst ferdium-app-8db37ba8a6ed7a1d66e5e3b805abd4ceb5762c00.zip |
Fix 'stores.app.accentColor is marked as required' console error (#1859)
Fixes: #1687
Co-authored-by: Vijay A <avijayr@protonmail.com>
Diffstat (limited to 'src/components/ui')
-rw-r--r-- | src/components/ui/FullscreenLoader/index.js | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/components/ui/FullscreenLoader/index.js b/src/components/ui/FullscreenLoader/index.js index 97ab93dcf..2952cd96b 100644 --- a/src/components/ui/FullscreenLoader/index.js +++ b/src/components/ui/FullscreenLoader/index.js | |||
@@ -1,6 +1,6 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer, inject } from 'mobx-react'; | 3 | import { observer } from 'mobx-react'; |
4 | import injectSheet, { withTheme } from 'react-jss'; | 4 | import injectSheet, { withTheme } from 'react-jss'; |
5 | import classnames from 'classnames'; | 5 | import classnames from 'classnames'; |
6 | 6 | ||
@@ -8,7 +8,7 @@ import Loader from '../Loader'; | |||
8 | 8 | ||
9 | import styles from './styles'; | 9 | import styles from './styles'; |
10 | 10 | ||
11 | export default @inject('stores') @withTheme @injectSheet(styles) @observer class FullscreenLoader extends Component { | 11 | export default @withTheme @injectSheet(styles) @observer class FullscreenLoader extends Component { |
12 | static propTypes = { | 12 | static propTypes = { |
13 | className: PropTypes.string, | 13 | className: PropTypes.string, |
14 | title: PropTypes.string.isRequired, | 14 | title: PropTypes.string.isRequired, |
@@ -16,16 +16,6 @@ export default @inject('stores') @withTheme @injectSheet(styles) @observer class | |||
16 | theme: PropTypes.object.isRequired, | 16 | theme: PropTypes.object.isRequired, |
17 | spinnerColor: PropTypes.string, | 17 | spinnerColor: PropTypes.string, |
18 | children: PropTypes.node, | 18 | children: PropTypes.node, |
19 | stores: PropTypes.shape({ | ||
20 | app: PropTypes.shape({ | ||
21 | accentColor: PropTypes.string.isRequired, | ||
22 | }).isRequired, | ||
23 | settings: PropTypes.shape({ | ||
24 | app: PropTypes.shape({ | ||
25 | accentColor: PropTypes.string.isRequired, | ||
26 | }).isRequired, | ||
27 | }).isRequired, | ||
28 | }).isRequired, | ||
29 | }; | 19 | }; |
30 | 20 | ||
31 | static defaultProps = { | 21 | static defaultProps = { |
@@ -42,16 +32,10 @@ export default @inject('stores') @withTheme @injectSheet(styles) @observer class | |||
42 | spinnerColor, | 32 | spinnerColor, |
43 | className, | 33 | className, |
44 | theme, | 34 | theme, |
45 | stores, | ||
46 | } = this.props; | 35 | } = this.props; |
47 | 36 | ||
48 | return ( | 37 | return ( |
49 | <div | 38 | <div className={classes.wrapper}> |
50 | className={classes.wrapper} | ||
51 | style={{ | ||
52 | background: stores.app.accentColor, | ||
53 | }} | ||
54 | > | ||
55 | <div | 39 | <div |
56 | className={classnames({ | 40 | className={classnames({ |
57 | [`${classes.component}`]: true, | 41 | [`${classes.component}`]: true, |