Skip to content

Commit

Permalink
Rewards screen swipe transition from hamburger menu (#154)
Browse files Browse the repository at this point in the history
* Clean up

* Removed rewards stack

* Updated drawer spacing
  • Loading branch information
thumn authored May 11, 2020
1 parent e2d901d commit e681415
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 56 deletions.
9 changes: 0 additions & 9 deletions navigation/AppNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import AuthLoadingScreen from '../screens/auth/AuthLoadingScreen';
import DrawerContent from './DrawerContent';
import AuthStackNavigator from './stack_navigators/AuthStack';
import ResourcesStackNavigator from './stack_navigators/ResourcesStack';
import RewardsStackNavigator from './stack_navigators/RewardsStack';
import StoresStackNavigator from './stack_navigators/StoresStack';

const Drawer = createDrawerNavigator();
Expand Down Expand Up @@ -45,14 +44,6 @@ function DrawerNavigator() {
component={StoresStackNavigator}
options={{ title: 'Map', swipeEnabled: false }}
/>
<Drawer.Screen
name="Rewards"
component={RewardsStackNavigator}
options={{
title: 'Rewards',
drawerLockMode: 'locked-closed',
}}
/>
<Drawer.Screen
name="Resources"
component={ResourcesStackNavigator}
Expand Down
13 changes: 10 additions & 3 deletions navigation/DrawerContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import PropTypes from 'prop-types';
import React from 'react';
import { AsyncStorage, Linking, TouchableOpacity, View } from 'react-native';
import * as Sentry from 'sentry-expo';

import { Title } from '../components/BaseComponents';
import Colors from '../constants/Colors';
import { getCustomersById } from '../lib/airtable/request';
Expand Down Expand Up @@ -109,9 +108,17 @@ function DrawerContent(props) {
</View>
<DrawerItemList {...props} />
<TouchableOpacity
style={{ padding: 8, height: 114 }}
style={{ paddingHorizontal: 8, paddingVertical: 13 }}
onPress={() => {
props.navigation.goBack();
props.navigation.navigate('RewardsOverlay');
}}>
<Title style={{ height: 30 }}>Rewards</Title>
</TouchableOpacity>
<TouchableOpacity
style={{ paddingHorizontal: 8, paddingVertical: 13 }}
onPress={() => Linking.openURL(link)}>
<Title>Feedback</Title>
<Title style={{ height: 30 }}>Feedback</Title>
</TouchableOpacity>
<View
style={{
Expand Down
44 changes: 0 additions & 44 deletions navigation/stack_navigators/RewardsStack.js

This file was deleted.

0 comments on commit e681415

Please sign in to comment.