Skip to content

Commit

Permalink
Add a navigation handler
Browse files Browse the repository at this point in the history
Add a localStorage handler
Resolves: #73 #68
  • Loading branch information
Dinç Özdemir authored and yavrib committed Jun 10, 2018
1 parent bde1f4b commit fbd9cfa
Show file tree
Hide file tree
Showing 33 changed files with 516 additions and 15,368 deletions.
15 changes: 12 additions & 3 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { StyleSheet, Text, SafeAreaView } from 'react-native';
import { StyleSheet, Text } from 'react-native';
import SafeAreaView from 'react-native-safe-area-view';
import Sentry from 'sentry-expo';

import { createStore, applyMiddleware } from 'redux';
Expand All @@ -12,15 +13,21 @@ import config from './config';
import reducers from './src/redux/reducers';
import Router from './src/Router';

const store = createStore(reducers, {}, applyMiddleware(ReduxThunk));
import Navigator from './src/redux/listeners';

export default class App extends React.Component {
const store = createStore(reducers, {}, applyMiddleware(ReduxThunk, Navigator));

class App extends React.Component {
constructor() {
super();
console.ignoredYellowBox = ['Setting a timer'];
Sentry.config(config.sentry.publicDSN).install();
}

state = {
appLoaded: false
};

componentWillMount() {
firebase.initializeApp(config.firebase);
this.setState({ appLoaded: true });
Expand All @@ -47,3 +54,5 @@ const styles = StyleSheet.create({
flex: 1
}
});

export default App;
3 changes: 2 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"bundleIdentifier": "com.devinim.shoppinglist"
},
"android": {
"package": "com.devinim.shoppinglist"
"package": "com.devinim.shoppinglist",
"versionCode": 3
},
"androidStatusBar": {
"barStyle": "light-content",
Expand Down
14,718 changes: 0 additions & 14,718 deletions package-lock.json

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"react-native": "https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz",
"react-native-elements": "^1.0.0-beta5",
"react-native-popup-dialog": "^0.11.46",
"react-native-safe-area-view": "^0.8.0",
"react-native-swipeable": "^0.6.0",
"react-native-vector-icons": "^4.6.0",
"react-navigation": "^2.0.0-rc.9",
Expand Down
16 changes: 13 additions & 3 deletions src/Router.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React from 'react';
import { Constants } from 'expo';
import { createStackNavigator } from 'react-navigation';

import { SignUpScreen, SignInScreen, ButtonScreen, ListScreen, CreateHouseScreen, JoinHouseScreen } from './screens';
import NavigatorService from './services/navigationService';
import { EntryScreen, SignUpScreen, SignInScreen, ButtonScreen, ListScreen, CreateHouseScreen, JoinHouseScreen } from './screens';

const Router = createStackNavigator(
const Navigator = createStackNavigator(
{
Entry: { screen: EntryScreen },
SignIn: { screen: SignInScreen },
SignUp: { screen: SignUpScreen },
JoinHouse: { screen: JoinHouseScreen },
Expand All @@ -13,7 +16,7 @@ const Router = createStackNavigator(
List: { screen: ListScreen }
},
{
initialRouteName: 'SignIn',
initialRouteName: 'Entry',
navigationOptions: {
headerStyle: {
backgroundColor: '#6bc035',
Expand All @@ -29,4 +32,11 @@ const Router = createStackNavigator(
}
);

const Router = () => (
<Navigator
ref={navigatorRef => {
NavigatorService.initialize(navigatorRef);
}}/>
);

export default Router;
Empty file removed src/redux/actions/buttonActions.js
Empty file.
122 changes: 0 additions & 122 deletions src/redux/actions/houseActions.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/redux/actions/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
export * from './houseActions';
export * from './buttonActions';
export * from './shoppingListActions';
export * from './sessionActions';
export * from './userActions';
Loading

0 comments on commit fbd9cfa

Please sign in to comment.