mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-30 17:14:22 +03:00
Application container structure changed
This commit is contained in:
parent
e2554884be
commit
215fb1e3a6
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
|
||||
import { Application } from './screens/application';
|
||||
import Application from './screens/application';
|
||||
import store from './redux/store/store';
|
||||
|
||||
export default () => (
|
||||
|
@ -399,21 +399,27 @@ class ApplicationContainer extends Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedLanguage, isConnected, toastNotification } = this.props;
|
||||
const {
|
||||
selectedLanguage,
|
||||
isConnected,
|
||||
toastNotification,
|
||||
isDarkTheme: _isDarkTheme,
|
||||
children,
|
||||
} = this.props;
|
||||
const { isRenderRequire, isReady, isThemeReady } = this.state;
|
||||
|
||||
if (isRenderRequire && isThemeReady) {
|
||||
return (
|
||||
<ApplicationScreen
|
||||
isConnected={isConnected}
|
||||
locale={selectedLanguage}
|
||||
toastNotification={toastNotification}
|
||||
isReady={isReady}
|
||||
{...this.props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
return <Launch />;
|
||||
return (
|
||||
children &&
|
||||
children({
|
||||
isConnected,
|
||||
toastNotification,
|
||||
isReady,
|
||||
isRenderRequire,
|
||||
isThemeReady,
|
||||
isDarkTheme: _isDarkTheme,
|
||||
locale: selectedLanguage,
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,35 @@
|
||||
import ApplicationScreen from './screen/applicationScreen';
|
||||
import Application from './container/applicationContainer';
|
||||
import React from 'react';
|
||||
|
||||
import ApplicationScreen from './screen/applicationScreen';
|
||||
import ApplicationContainer from './container/applicationContainer';
|
||||
|
||||
const Application = () => (
|
||||
<ApplicationContainer>
|
||||
{({
|
||||
isConnected,
|
||||
locale,
|
||||
toastNotification,
|
||||
isReady,
|
||||
isDarkTheme,
|
||||
isRenderRequire,
|
||||
isThemeReady,
|
||||
}) => {
|
||||
if (!isRenderRequire || !isThemeReady) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<ApplicationScreen
|
||||
isConnected={isConnected}
|
||||
locale={locale}
|
||||
toastNotification={toastNotification}
|
||||
isReady={isReady}
|
||||
isDarkTheme={isDarkTheme}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</ApplicationContainer>
|
||||
);
|
||||
|
||||
export { Application, ApplicationScreen };
|
||||
export default Application;
|
||||
|
||||
export { ApplicationContainer, ApplicationScreen };
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import { AppState, Platform, Linking, Alert } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
import Push from 'appcenter-push';
|
||||
import { injectIntl } from 'react-intl';
|
||||
import get from 'lodash/get';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user