Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into release-1.5.0
  • Loading branch information
wangannie committed Dec 30, 2020
2 parents ba901cb + 5345a8a commit 06ca53f
Show file tree
Hide file tree
Showing 21 changed files with 963 additions and 1,016 deletions.
17 changes: 10 additions & 7 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FontAwesome5 } from '@expo/vector-icons';
import { AppLoading } from 'expo';
import AppLoading from 'expo-app-loading';
import { Asset } from 'expo-asset';
import * as Analytics from 'expo-firebase-analytics';
import * as Font from 'expo-font';
Expand All @@ -11,6 +11,7 @@ import { SafeAreaProvider } from 'react-native-safe-area-context';
import * as Sentry from 'sentry-expo';
import Colors from './constants/Colors';
import { env } from './environment';
import { logErrorToSentry } from './lib/logUtils';
import AppNavigator from './navigation/AppNavigator';

Sentry.init({
Expand Down Expand Up @@ -60,17 +61,19 @@ async function loadResourcesAsync() {
Font.loadAsync({
// This is the icon style we use
...FontAwesome5.font,
// Poppins is the custom font used across the application
'poppins-regular': require('./assets/fonts/Poppins-Regular.ttf'),
'poppins-semibold': require('./assets/fonts/Poppins-SemiBold.ttf'),
'poppins-medium': require('./assets/fonts/Poppins-Medium.ttf'),
// Open Sans is the custom font used across the application
'opensans-regular': require('./assets/fonts/OpenSans-Regular.ttf'),
'opensans-semibold': require('./assets/fonts/OpenSans-SemiBold.ttf'),
'opensans-bold': require('./assets/fonts/OpenSans-Bold.ttf'),
}),
]);
}

function handleLoadingError(error) {
// In this case, you might want to report the error to your error reporting
// service, for example Sentry
logErrorToSentry({
action: 'AppLoading',
error: err,
});
console.warn(error);
}

Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Healthy Corners",
"slug": "healthy-corners",
"privacy": "public",
"sdkVersion": "38.0.0",
"sdkVersion": "40.0.0",
"platforms": ["ios", "android", "web"],
"version": "1.4.2",
"primaryColor": "#008550",
Expand Down
Binary file added assets/fonts/OpenSans-Bold.ttf
Binary file not shown.
Binary file added assets/fonts/OpenSans-Regular.ttf
Binary file not shown.
Binary file added assets/fonts/OpenSans-SemiBold.ttf
Binary file not shown.
Binary file removed assets/fonts/Poppins-Medium.ttf
Binary file not shown.
Binary file removed assets/fonts/Poppins-Regular.ttf
Binary file not shown.
Binary file removed assets/fonts/Poppins-SemiBold.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion components/AuthTextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function AuthTextField({
selectionColor={Colors.primaryGreen}
style={{
marginBottom: 8,
fontFamily: 'poppins-regular',
fontFamily: 'opensans-regular',
}}
/>
{fieldType.includes('Name') && !error && (
Expand Down
14 changes: 7 additions & 7 deletions components/BaseComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Colors from '../constants/Colors';
export const ButtonContainer = styled.TouchableOpacity``;

export const ButtonLabel = styled.Text`
font-family: poppins-semibold;
font-family: opensans-semibold;
font-size: 14px;
line-height: 20px;
text-align: ${(props) => props.textAlign || 'center'};
Expand Down Expand Up @@ -43,23 +43,23 @@ export const OutlinedButtonContainer = styled(ButtonContainer)`
export const BigTitle = styled.Text.attrs({
allowFontScaling: false,
})`
font-family: poppins-medium;
font-family: opensans-semibold;
font-size: 32px;
line-height: 48px;
text-align: ${(props) => props.align || 'left'};
color: ${(props) => props.color || Colors.activeText};
`;

export const Title = styled.Text`
font-family: poppins-medium;
font-family: opensans-semibold;
font-size: 20px;
line-height: 30px;
color: ${(props) => props.color || Colors.activeText};
text-align: ${(props) => props.textAlign || 'left'};
`;

export const Subtitle = styled.Text`
font-family: poppins-regular;
font-family: opensans-regular;
font-size: 16px;
line-height: 24px;
color: ${(props) => props.color || Colors.activeText};
Expand All @@ -68,23 +68,23 @@ export const Subtitle = styled.Text`

export const Body = styled.Text`
font-family: ${(props) =>
props.bold ? 'poppins-semibold' : 'poppins-regular'};
props.bold ? 'opensans-semibold' : 'opensans-regular'};
font-size: 14px;
line-height: 20px;
color: ${(props) => props.color || Colors.activeText};
text-align: ${(props) => props.textAlign || 'left'};
`;

export const Caption = styled.Text`
font-family: poppins-medium;
font-family: opensans-semibold;
font-size: 12px;
line-height: 16px;
color: ${(props) => props.color || Colors.activeText};
text-align: ${(props) => props.textAlign || 'left'};
`;

export const Overline = styled.Text`
font-family: poppins-regular;
font-family: opensans-regular;
font-size: 14px;
line-height: 20px;
text-transform: uppercase;
Expand Down
2 changes: 1 addition & 1 deletion components/product/StoreProducts.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function StoreProducts({ navigation, store, products }) {
{products.length > 0 && PixelRatio.getFontScale() < 1.2 && (
<StoreDetailText
color={Colors.secondaryText}
style={{ marginTop: 4 }}>
style={{ marginTop: 2 }}>
recently delivered
</StoreDetailText>
)}
Expand Down
3 changes: 2 additions & 1 deletion lib/mapUtils.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import AsyncStorage from '@react-native-community/async-storage';
import Clipboard from 'expo-clipboard';
import * as Analytics from 'expo-firebase-analytics';
import * as Location from 'expo-location';
import * as Permissions from 'expo-permissions';
import geo2zip from 'geo2zip';
import convertDistance from 'geolib/es/convertDistance';
import getDistance from 'geolib/es/getDistance';
import { useEffect, useState } from 'react';
import { Alert, Clipboard } from 'react-native';
import { Alert } from 'react-native';
import { showLocation } from 'react-native-map-link';
import {
daysOfTheWeek,
Expand Down
4 changes: 2 additions & 2 deletions navigation/AppNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function DrawerNavigator() {
drawerContent={(props) => <DrawerContent {...props} />}
drawerContentOptions={{
labelStyle: {
fontFamily: 'poppins-medium',
fontFamily: 'opensans-semibold',
fontWeight: 'normal',
fontSize: 20,
color: Colors.activeText,
Expand Down Expand Up @@ -73,7 +73,7 @@ function DrawerNavigator() {

const AppStack = createStackNavigator();

export default function createAppContainer() {
export default function AppContainer() {
const routeNameRef = React.useRef();
const navigationRef = React.useRef();

Expand Down
70 changes: 36 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,37 +50,39 @@
}
},
"dependencies": {
"@babel/core": "^7.0.0",
"@babel/core": "~7.9.0",
"@expo/samples": "~3.0.3",
"@expo/vector-icons": "^10.0.0",
"@react-native-community/async-storage": "^1.11.0",
"@expo/vector-icons": "^12.0.0",
"@react-native-community/async-storage": "~1.12.0",
"@react-native-community/clipboard": "^1.5.1",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/core": "^3.0.0-alpha.13",
"@react-navigation/drawer": "^5.3.4",
"@react-navigation/native": "^5.1.3",
"@react-navigation/stack": "^5.2.8",
"@unimodules/core": "^5.3.0",
"@unimodules/core": "~6.0.0",
"airtable": "^0.7.1",
"expo": "^38.0.0",
"expo-asset": "~8.1.7",
"expo-branch": "~2.2.1",
"expo-camera": "~8.3.1",
"expo-cli": "^3.18.0",
"expo-constants": "~9.1.1",
"expo-crypto": "~8.2.1",
"expo-firebase-analytics": "~2.4.1",
"expo-firebase-core": "~1.1.1",
"expo": "^40.0.0",
"expo-app-loading": "^1.0.1",
"expo-asset": "~8.2.1",
"expo-branch": "~3.0.0",
"expo-camera": "~9.1.0",
"expo-cli": "^4.0.17",
"expo-clipboard": "~1.0.1",
"expo-constants": "~9.3.3",
"expo-crypto": "~8.4.0",
"expo-firebase-analytics": "~2.6.0",
"expo-firebase-core": "~1.3.0",
"expo-firebase-recaptcha": "^1.1.0",
"expo-font": "~8.2.1",
"expo-haptics": "~8.2.1",
"expo-linking": "^1.0.3",
"expo-location": "~8.2.1",
"expo-notifications": "~0.3.3",
"expo-permissions": "~9.0.1",
"expo-status-bar": "^1.0.0",
"expo-updates": "~0.2.8",
"expo-web-browser": "~8.3.1",
"expo-font": "~8.4.0",
"expo-haptics": "~8.4.0",
"expo-linking": "~2.0.0",
"expo-location": "~10.0.0",
"expo-notifications": "~0.8.2",
"expo-permissions": "~10.0.0",
"expo-status-bar": "~1.0.3",
"expo-updates": "~0.4.1",
"expo-web-browser": "~8.6.0",
"firebase": "7.9.0",
"geo2zip": "^2.0.2",
"geolib": "^3.1.0",
Expand All @@ -91,31 +93,31 @@
"moment": "^2.29.1",
"npm": "^6.14.6",
"prop-types": "^15.0",
"react": "16.11.0",
"react-dom": "16.11.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-geocode": "^0.2.0",
"react-is": "^16.12.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-alert-async": "^1.0.5",
"react-native-autoheight-webview": "^1.5.1",
"react-native-elements": "^1.2.6",
"react-native-firebase": "^5.6.0",
"react-native-gesture-handler": "~1.6.0",
"react-native-gesture-handler": "~1.8.0",
"react-native-global-props": "^1.1.5",
"react-native-map-link": "^2.7.5",
"react-native-maps": "0.27.1",
"react-native-materialui-textfield": "^0.13.2",
"react-native-paper": "^3.6.0",
"react-native-paper": "^4.5.0",
"react-native-phone-input": "^0.2.4",
"react-native-reanimated": "~1.9.0",
"react-native-safe-area-context": "~3.0.7",
"react-native-screens": "~2.9.0",
"react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "~2.15.0",
"react-native-smooth-pincode-input": "^1.0.9",
"react-native-snap-carousel": "^3.9.0",
"react-native-tab-view": "^2.11.0",
"react-native-vector-icons": "^6.6.0",
"react-native-web": "~0.11.7",
"react-native-webview": "9.4.0",
"react-native-web": "~0.13.12",
"react-native-webview": "11.0.0",
"react-phone-number-input": "^2.3.24",
"reanimated-bottom-sheet": "^1.0.0-alpha.15",
"sentry-expo": "^2.0.3",
Expand All @@ -125,7 +127,7 @@
"devDependencies": {
"airtable-schema-generator": "^1.3.4",
"babel-eslint": "^10.0.3",
"babel-preset-expo": "^8.2.3",
"babel-preset-expo": "8.3.0",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.9.0",
Expand All @@ -136,7 +138,7 @@
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-react-native": "^3.8.1",
"husky": "^4.2.1",
"jest-expo": "^38.0.0",
"jest-expo": "^40.0.0",
"lint-staged": "^10.0.6",
"prettier": "^1.18.2",
"react-devtools": "^4.8.2",
Expand Down
2 changes: 1 addition & 1 deletion screens/auth/VerificationScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default class VerificationScreen extends React.Component {
textStyle={{
color: Colors.activeText,
fontSize: 24,
fontFamily: 'poppins-regular',
fontFamily: 'opensans-regular',
}}
ref={(input) => {
this.pinInput = input;
Expand Down
17 changes: 13 additions & 4 deletions screens/settings/NameChangeScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,19 @@ export default class NameChangeScreen extends React.Component {
};

changeName = async () => {
await updateCustomer(this.state.customer.id, {
name: this.state.values[inputFields.NAME],
});
this.props.navigation.navigate('Settings');
try {
await updateCustomer(this.state.customer.id, {
name: this.state.values[inputFields.NAME],
});
this.props.navigation.navigate('Settings');
} catch (err) {
console.log('[NameChangeScreen] (changeName) Airtable:', err);
logErrorToSentry({
screen: 'NameChangeScreen',
action: 'changeName',
error: err,
});
}
};

render() {
Expand Down
8 changes: 4 additions & 4 deletions styled/news.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from 'styled-components/native';
import { PoppinsText } from './shared';
import { OpenSansText } from './shared';

export const Card = styled.View`
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2);
Expand All @@ -18,7 +18,7 @@ export const DateContainer = styled.View`
flex: 1;
`;

export const DateText = styled(PoppinsText)`
export const DateText = styled(OpenSansText)`
font-weight: bold;
`;

Expand All @@ -27,11 +27,11 @@ export const ContentContainer = styled.View`
flex: 4;
`;

export const ContentText = styled(PoppinsText)`
export const ContentText = styled(OpenSansText)`
font-weight: normal;
`;

export const TopText = styled(PoppinsText)`
export const TopText = styled(OpenSansText)`
font-style: normal;
font-weight: 900;
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion styled/rewards.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const styles = StyleSheet.create({
color: Colors.lightText,
textTransform: 'capitalize',
fontSize: 16,
fontFamily: 'poppins-medium',
fontFamily: 'opensans-semibold',
paddingLeft: 6,
paddingRight: 6,
},
Expand Down
4 changes: 2 additions & 2 deletions styled/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export const SpaceAroundRowContainer = styled.View`
justify-content: space-around;
`;

export const PoppinsText = styled.Text`
font-family: poppins-regular;
export const OpenSansText = styled.Text`
font-family: opensans-regular;
`;

export const JustifyCenterContainer = styled.View`
Expand Down
4 changes: 2 additions & 2 deletions styled/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const MarkerContainer = styled.View`

export const MarkerStoreName = styled.Text`
font-family: ${(props) =>
props.focused ? 'poppins-semibold' : 'poppins-medium'};
props.focused ? 'opensans-bold' : 'opensans-semibold'};
font-size: ${(props) => (props.focused ? '16px' : '14px')};
line-height: ${(props) => (props.focused ? '24px' : '20px')};
text-align: center;
Expand Down Expand Up @@ -93,7 +93,7 @@ export const styles = StyleSheet.create({
borderTopColor: 'transparent',
},
input: {
fontFamily: 'poppins-regular',
fontFamily: 'opensans-regular',
},
tagChip: {
backgroundColor: Colors.lightestGreen,
Expand Down
Loading

0 comments on commit 06ca53f

Please sign in to comment.