| Total Complexity | 3 |
| Complexity/F | 1.5 |
| Lines of Code | 40 |
| Function Count | 2 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import App from 'next/app' |
||
| 2 | import React from 'react' |
||
| 3 | import { LocalizeProvider } from 'react-localize-redux' |
||
| 4 | import { IconContext } from 'react-icons/lib/' |
||
| 5 | import LocalizedComponent from '~/modules/core/localize/LocalizedComponent' |
||
| 6 | import Loading from '~/modules/core/components/Loading' |
||
| 7 | import ErrorBoundary from '~/modules/core/components/ErrorBoundary' |
||
| 8 | import ThemeProviderSelector from '~/modules/core/theme/ThemeProviderSelector' |
||
| 9 | |||
| 10 | import 'bootstrap/dist/css/bootstrap.min.css' |
||
| 11 | |||
| 12 | export default class MyApp extends App { |
||
| 13 | state = { |
||
| 14 | loading: true |
||
| 15 | } |
||
| 16 | |||
| 17 | componentDidMount() { |
||
| 18 | this.setState({ loading: false }) |
||
| 19 | } |
||
| 20 | |||
| 21 | render() { |
||
| 22 | const { Component, pageProps } = this.props |
||
| 23 | return this.state.loading ? ( |
||
| 24 | <Loading /> |
||
| 25 | ) : ( |
||
| 26 | <IconContext.Provider value={{ style: { verticalAlign: 'middle' } }}> |
||
| 27 | <ThemeProviderSelector> |
||
| 28 | <LocalizeProvider> |
||
| 29 | <LocalizedComponent> |
||
| 30 | <ErrorBoundary> |
||
| 31 | <Component {...pageProps} /> |
||
| 32 | </ErrorBoundary> |
||
| 33 | </LocalizedComponent> |
||
| 34 | </LocalizeProvider> |
||
| 35 | </ThemeProviderSelector> |
||
| 36 | </IconContext.Provider> |
||
| 37 | ) |
||
| 38 | } |
||
| 39 | } |
||
| 40 |