Removed darkThemeContainer

This commit is contained in:
Mustafa Buyukcelebi 2019-10-28 23:28:11 +03:00
parent 6a109fa773
commit 60322ecba3
3 changed files with 3 additions and 19 deletions

View File

@ -10,7 +10,7 @@ import { updateActiveBottomTab } from '../../../redux/actions/uiAction';
import ROUTES from '../../../constants/routeNames';
// Container
import { DarkThemeContainer } from '../../../containers';
import { ThemeContainer } from '../../../containers';
// Components
import TabBar from './tabbar';
@ -44,7 +44,7 @@ const BottomTabBarView = ({
}, [dispatch, index, routes]);
return (
<DarkThemeContainer>
<ThemeContainer>
{({ isDarkTheme }) => (
<SafeAreaView style={styles.wrapper}>
<TabBar
@ -74,7 +74,7 @@ const BottomTabBarView = ({
</TabBar>
</SafeAreaView>
)}
</DarkThemeContainer>
</ThemeContainer>
);
};

View File

@ -1,14 +0,0 @@
import { React } from 'react';
import { connect } from 'react-redux';
const DarkThemeContainer = ({ children, isDarkTheme }) =>
children &&
children({
isDarkTheme,
});
const mapStateToProps = state => ({
isDarkTheme: state.application.isDarkTheme,
});
export default connect(mapStateToProps)(DarkThemeContainer);

View File

@ -1,4 +1,3 @@
import DarkThemeContainer from './darkThemeContainer';
import InAppPurchaseContainer from './inAppPurchaseContainer';
import PointsContainer from './pointsContainer';
import ProfileContainer from './profileContainer';
@ -9,7 +8,6 @@ import TransferContainer from './transferContainer';
import ThemeContainer from './themeContainer';
export {
DarkThemeContainer,
InAppPurchaseContainer,
PointsContainer,
ProfileContainer,