Commit a2e87e73 authored by Milan DiGiuseppe's avatar Milan DiGiuseppe

nav refactor + screen background color fix

parent 4f3425e1
......@@ -2,10 +2,9 @@
import React from 'react';
import { Provider } from 'react-redux';
import { configureStore } from '@reduxjs/toolkit';
import { NavigationContainer } from '@react-navigation/native';
import { getCurrentPosition } from './src/store/location/LocationActions';
import RootReducer from './src/store/RootReducer';
import TabNavigator from './src/TabNavigator';
import AppContainer from './src/AppContainer';
const store = configureStore({
reducer: RootReducer,
......@@ -15,9 +14,7 @@ store.dispatch(getCurrentPosition());
const App = () => (
<Provider store={store}>
<NavigationContainer>
<TabNavigator />
</NavigationContainer>
<AppContainer />
</Provider>
);
......
import React from 'react';
import { Icon } from 'react-native-elements';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { NavigationContainer, DefaultTheme } from '@react-navigation/native';
import DiscoverScreen from './screens/DiscoverScreen';
import MessageCreateScreen from './screens/MessageCreateScreen';
import SavedMessagesScreen from './screens/SavedMessagesScreen';
import theme from './theme';
const NavTheme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
background: theme.colors.white,
},
};
const TabIcon: React.FC<{ name: string}> = ({ name }) => (
<Icon
name={name}
......@@ -46,4 +55,10 @@ const TabNavigator = () => (
</Tab.Navigator>
);
export default TabNavigator;
const AppContainer = () => (
<NavigationContainer theme={NavTheme}>
<TabNavigator />
</NavigationContainer>
);
export default AppContainer;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment