Skip to content

Commit

Permalink
v1.1.1 Release (#92)
Browse files Browse the repository at this point in the history
* Updated to prod IDs

* Bump version numbers

* Change Sentry env

* Updated guestmode with prod IDs

* temp fixes

* Sentry switch environment

* Fixed deprecated rnpm issue

* Added Google Maps API key

* Removed deprecated guest mode on mapscreen

* Fixed missing Alert import

* Temporary env changes

* Fixed drawer swipe issues

* Renamed COVID resources

* Bump build number to 1.1.2

* Bump version code

* Reverted to dev IDs
  • Loading branch information
wangannie authored Apr 18, 2020
1 parent d82236d commit 23027cc
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 56 deletions.
7 changes: 3 additions & 4 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import AppNavigator from './navigation/AppNavigator';

Sentry.init({
dsn: 'https://[email protected]/5172575',
enableInExpoDevelopment: true,
enableInExpoDevelopment: false,
release: 'v1.1.0',
debug: true,
environment: 'development',
debug: false,
environment: process.env.NODE_ENV,
});

export default function App(props) {
const [isLoadingComplete, setLoadingComplete] = useState(false);

Expand Down
29 changes: 15 additions & 14 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
"name": "Healthy Corners Rewards",
"slug": "healthy-corners-rewards",
"privacy": "public",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.1",
"sdkVersion": "37.0.0",
"platforms": ["ios", "android", "web"],
"version": "1.1.0",
"primaryColor": "#008550",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
Expand All @@ -20,12 +17,10 @@
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"assetBundlePatterns": ["**/*"],
"ios": {
"bundleIdentifier": "org.calblueprint.HealthyCornersRewards",
"buildNumber": "1.0.1",
"buildNumber": "1.1.2",
"supportsTablet": true,
"infoPlist": {
"NSLocationWhenInUseUsageDescription": "To find nearby stores and see what products are available.",
Expand All @@ -36,15 +31,21 @@
"lyft",
"waze"
]
},
"config": {
"googleMapsApiKey": "AIzaSyAt2wwpTvYIBhVpgkFZ3fa7dY3Kw2cc5uU"
}
},
"android": {
"package": "org.calblueprint.HealthyCornersRewards",
"googleServicesFile": "./google-services.json",
"permissions": [
"ACCESS_COARSE_LOCATION",
"ACCESS_FINE_LOCATION"
]
"config": {
"googleMaps": {
"apiKey": "AIzaSyD_-M-Tjp0-QN2exYtlNZk3eMBnQPPkxWk"
}
},
"permissions": ["ACCESS_COARSE_LOCATION", "ACCESS_FINE_LOCATION"],
"versionCode": 3
},
"hooks": {
"postPublish": [
Expand Down
6 changes: 4 additions & 2 deletions lib/airtable/airtable.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
If you're adding a new function: make sure you add a corresponding test (at least 1) for it in airtable.spec.js
*/
import Airtable from 'airtable';
import getEnvVars from '../../environment';
import { Columns } from './schema';

const BASE_ID = 'appYfW7a2loPD26Vg';
const { AIRTABLE_API_KEY, AIRTABLE_BASE_ID } = getEnvVars();
const BASE_ID = AIRTABLE_BASE_ID;
const VIEW = 'Grid view';
const ENDPOINT_URL = 'https://api.airtable.com';

const apiKey = process.env.REACT_APP_AIRTABLE_API_KEY;
const apiKey = AIRTABLE_API_KEY;

Airtable.configure({
endpointUrl: ENDPOINT_URL,
Expand Down
5 changes: 3 additions & 2 deletions navigation/AppNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function DrawerNavigator() {
<Drawer.Screen
name="Stores"
component={StoresStackNavigator}
options={{ title: 'Stores' }}
options={{ title: 'Stores', swipeEnabled: false }}
/>
{/* <Drawer.Screen
name="Rewards"
Expand All @@ -39,7 +39,7 @@ function DrawerNavigator() {
<Drawer.Screen
name="Resources"
component={ResourcesStackNavigator}
options={{ title: 'Resources' }}
options={{ title: 'Resources', swipeEnabled: false }}
/>
</Drawer.Navigator>
);
Expand All @@ -55,6 +55,7 @@ export default function createAppContainer() {
screenOptions={{
headerShown: false,
cardStyle: { backgroundColor: Colors.lightest },
gestureEnabled: false,
}}>
<AppStack.Screen name="AuthLoading" component={AuthLoadingScreen} />
<AppStack.Screen
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,5 @@
"prettier": "^1.18.2",
"yarnhook": "^0.4.3"
},
"private": true,
"rnpm": {
"assets": [
"./assets/fonts/"
]
}
"private": true
}
3 changes: 3 additions & 0 deletions react-native.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
assets: ['./assets/fonts/'],
};
16 changes: 3 additions & 13 deletions screens/map/MapScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ import convertDistance from 'geolib/es/convertDistance';
import getDistance from 'geolib/es/getDistance';
import PropTypes from 'prop-types';
import React from 'react';
import { AsyncStorage, StyleSheet, TouchableOpacity, View } from 'react-native';
import { Alert, StyleSheet, TouchableOpacity, View } from 'react-native';
import MapView, { Marker } from 'react-native-maps';
import BottomSheet from 'reanimated-bottom-sheet';
import { NavHeaderContainer, Subhead } from '../../components/BaseComponents';
import CenterLocation from '../../components/CenterLocation';
import Hamburger from '../../components/Hamburger';
import StoreProducts from '../../components/product/StoreProducts';
import RewardsFooter from '../../components/rewards/RewardsFooter';
import StoreMarker from '../../components/store/StoreMarker';
import Colors from '../../constants/Colors';
import Window from '../../constants/Layout';
import { getCustomersById } from '../../lib/airtable/request';
import { getProductData, getStoreData } from '../../lib/mapUtils';
import {
BottomSheetContainer,
Expand Down Expand Up @@ -54,8 +52,6 @@ export default class MapScreen extends React.Component {
stores: null,
store: null,
storeProducts: null,
customer: null,
isGuest: false,
showDefaultStore: false,
};
}
Expand All @@ -64,19 +60,13 @@ export default class MapScreen extends React.Component {
// We get current location first, since we need to use the lat/lon found in _populateIntitialStoresProducts
await this._findCurrentLocation();
await this._populateInitialStoresProducts();
const customerId = await AsyncStorage.getItem('userId');
const customer = await getCustomersById(customerId);
const isGuest = customerId === 'recLKK7cZHboMPEB8';
this.setState({
customer,
isGuest,
});
}

// TODO pretty high chance this should be either handled by navigation or `getDerivedStateFromProps`
componentWillReceiveProps(nextProps) {
const store = nextProps.route.params.currentStore;
this.changeCurrentStore(store, (resetSheet = true));
const resetSheet = true;
this.changeCurrentStore(store, resetSheet);
const region = {
latitude: store.latitude,
longitude: store.longitude,
Expand Down
15 changes: 6 additions & 9 deletions screens/resources/ResourcesScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class ResourcesScreen extends React.Component {
constructor(props) {
super(props);
this.state = {
CovidResources: [],
CrisisResources: [],
DCCentralKitchenResources: [],
CommunityResources: [],
GovernmentResources: [],
Expand All @@ -26,8 +26,8 @@ export default class ResourcesScreen extends React.Component {
async componentDidMount() {
try {
const resources = await getAllResources();
const CovidResources = resources.filter(
resource => resource.category === 'COVID-19 (Coronavirus)'
const CrisisResources = resources.filter(
resource => resource.category === 'Crisis Response'
);
const DCCentralKitchenResources = resources.filter(
resource => resource.category === 'DC Central Kitchen Resources'
Expand All @@ -42,7 +42,7 @@ export default class ResourcesScreen extends React.Component {
resource => resource.category === 'Resources for Seniors'
);
this.setState({
CovidResources,
CrisisResources,
DCCentralKitchenResources,
CommunityResources,
GovernmentResources,
Expand All @@ -63,11 +63,8 @@ export default class ResourcesScreen extends React.Component {
<NavTitle>Resources</NavTitle>
</NavHeaderContainer>
<ScrollView>
<ResourceCategoryBar
icon="clinic-medical"
title="COVID-19 (Coronavirus)"
/>
{this.state.CovidResources.map(resource => (
<ResourceCategoryBar icon="hands-helping" title="Crisis Response" />
{this.state.CrisisResources.map(resource => (
<ResourceCard
key={resource.id}
resourceCard={resource}
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2709,9 +2709,9 @@ cli-truncate@^0.2.1:
string-width "^1.0.1"

cli-width@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=
version "2.2.1"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48"
integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==

cliui@^3.2.0:
version "3.2.0"
Expand Down Expand Up @@ -3421,9 +3421,9 @@ [email protected]:
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=

electron-to-chromium@^1.3.390:
version "1.3.403"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.403.tgz#c8bab4e2e72bf78bc28bad1cc355c061f9cc1918"
integrity sha512-JaoxV4RzdBAZOnsF4dAlZ2ijJW72MbqO5lNfOBHUWiBQl3Rwe+mk2RCUMrRI3rSClLJ8HSNQNqcry12H+0ZjFw==
version "1.3.405"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.405.tgz#b84fcb157edb26eae6c36d93d416cb51caa399bd"
integrity sha512-D+xkP+hAQY/790DzImC8bI8QJLaArNG4b74bYvkhkK/fli51JmNyUYxwKLSl/8VPGkkXEqKCupSDD05/E5P72w==

elegant-spinner@^1.0.1:
version "1.0.1"
Expand Down

0 comments on commit 23027cc

Please sign in to comment.