snackbar notification after updating zipcoe

This commit is contained in:
Bart Akeley 2018-11-24 11:16:25 -06:00
parent 832b9b1696
commit 23f9391906

View file

@ -6,6 +6,7 @@ import { palette } from '../ui-theme';
import { compose, withState, withHandlers, lifecycle } from 'recompose';
import { withRouterContext } from '../enhancers/routeEnhancers';
import { getLocation } from '../apis/PositionApi';
import Snackbar from 'react-native-snackbar';
type Props = {
zipcode: ?string,
@ -50,8 +51,6 @@ export const ProfilePage = (props: Props) => {
flex: 1,
flexDirection: 'column',
justifyContent: 'flex-end',
borderBottomColor: palette.disabledColor,
borderBottomWidth: 1,
height: 60,
}}>
<TextInput
@ -109,6 +108,7 @@ export default compose(
await AsyncStorage.setItem('zipcode', props.zipcode);
props.setLoading(false);
getLocation();
Snackbar.show({ title: 'Zipcode updated.' });
},
}),
withHandlers({