Skip to content

Commit 62638e5

Browse files
authored
v0.0.8 (#29)
* Fix build error with Stripe package without applying patches * fixed login and register * fix safearea on modals * fix edit place error and refactor codes * fixed cart and store locations * removed price divide * fixed tab bar deprecation * fixed cart stack options * fixed react-navigation deprecations * fixed store and photos screen crash * removed stripe integration * removed init stripe * fixed store locations on store picker * format codes * fixed category sheet visiblity * fixed action sheet visiblities * improved network header ui * improved ui of network and store screen * Fix UI layout issues * bump storefront sdk version * Refactor UI headers in multiple screens * Add currency and number formatting utils * Refactor CartCheckoutPanel, CartScreen, CheckoutScreen, and OrderCompletedScreen * Fix saved place header * Add Stripe payment gateway * Fix tip input currency * Refactor and improve ui checkout screen * Add StripePaymentSheet * Update translations and add some utility functions * Add stripe payment method * Fixed android build error * Update iOS build command to use --mode flag * Removed deprecated dexing transform property * Add Xcode setup action * Update Xcode version in CI workflow * Update iOS build command
1 parent 666e119 commit 62638e5

File tree

103 files changed

+46785
-21762
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+46785
-21762
lines changed

.eslintrc.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
module.exports = {
2-
root: true,
3-
extends: '@react-native-community',
2+
root: true,
3+
extends: '@react-native-community',
4+
rules: {
5+
'react/prop-types': 'off',
6+
},
47
};

.github/workflows/react-native-ci.yml

+104-99
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,111 @@
11
name: Storefront App CI
22

33
on:
4-
pull_request:
5-
branches: [ main ] # Trigger for PRs to main branch
4+
pull_request:
5+
branches: [main] # Trigger for PRs to main branch
66

77
env:
8-
FLEETBASE_KEY: ${{ secrets.FLEETBASE_KEY }}
9-
GOOGLE_MAPS_KEY: ${{ secrets.GOOGLE_MAPS_KEY }}
10-
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
8+
FLEETBASE_KEY: ${{ secrets.FLEETBASE_KEY }}
9+
GOOGLE_MAPS_KEY: ${{ secrets.GOOGLE_MAPS_KEY }}
10+
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
1111

1212
jobs:
13-
install_and_test:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v3
18-
19-
- name: Install Node.js
20-
uses: actions/setup-node@v1
21-
with:
22-
node-version: 18.x
23-
24-
- name: Install dependencies
25-
run: npm install -g yarn
26-
27-
- name: Install dependencies
28-
run: yarn install
29-
30-
android_build:
31-
runs-on: ubuntu-latest
32-
steps:
33-
- name: Checkout code
34-
uses: actions/checkout@v3
35-
36-
- name: Generate google-services.json
37-
env:
38-
GOOGLE_SERVICES_JSON: ${{ secrets.STOREFRONT_GOOGLE_SERVICES_JSON }}
39-
run: |
40-
echo "$GOOGLE_SERVICES_JSON" > google-services.json
41-
mkdir -p android/app/src
42-
mv google-services.json android/app/src
43-
44-
- name: Install Node.js
45-
uses: actions/setup-node@v1
46-
with:
47-
node-version: 18.x
48-
49-
- name: Install dependencies
50-
run: npm install -g yarn
51-
52-
- name: Install dependencies
53-
run: yarn install
54-
55-
- name: Set up JDK 17
56-
uses: actions/setup-java@v4
57-
with:
58-
distribution: 'oracle'
59-
java-version: '17'
60-
61-
- name: Cache Gradle Wrapper
62-
uses: actions/cache@v2
63-
with:
64-
path: ~/.gradle/wrapper
65-
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
66-
67-
- name: Cache Gradle Dependencies
68-
uses: actions/cache@v2
69-
with:
70-
path: ~/.gradle/caches
71-
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
72-
restore-keys: |
73-
${{ runner.os }}-gradle-caches-
74-
- name: Make Gradlew Executable
75-
run: cd android && chmod +x ./gradlew
76-
77-
- name: Build Android
78-
run: cd android && ./gradlew assembleDebug
79-
env:
80-
JVM_OPTS: '-Xmx4096m'
81-
82-
ios_build:
83-
runs-on: macOS-latest
84-
steps:
85-
- name: Checkout code
86-
uses: actions/checkout@v3
87-
88-
- name: Install Node.js
89-
uses: actions/setup-node@v4
90-
with:
91-
node-version: 18.x
92-
93-
- name: Install dependencies
94-
run: npm install -g yarn
95-
96-
- name: Install dependencies
97-
run: yarn install
98-
99-
- name: Install CocoaPods
100-
run: sudo gem install cocoapods
101-
102-
- name: Install iOS pods
103-
run: cd ios && pod install
104-
105-
- name: Build iOS
106-
run: npx react-native run-ios --configuration Release
13+
install_and_test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Install Node.js
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: 18.x
23+
24+
- name: Install dependencies
25+
run: npm install -g yarn
26+
27+
- name: Install dependencies
28+
run: yarn install
29+
30+
android_build:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v3
35+
36+
- name: Generate google-services.json
37+
env:
38+
GOOGLE_SERVICES_JSON: ${{ secrets.STOREFRONT_GOOGLE_SERVICES_JSON }}
39+
run: |
40+
echo "$GOOGLE_SERVICES_JSON" > google-services.json
41+
mkdir -p android/app/src
42+
mv google-services.json android/app/src
43+
44+
- name: Install Node.js
45+
uses: actions/setup-node@v1
46+
with:
47+
node-version: 18.x
48+
49+
- name: Install dependencies
50+
run: npm install -g yarn
51+
52+
- name: Install dependencies
53+
run: yarn install
54+
55+
- name: Set up JDK 17
56+
uses: actions/setup-java@v4
57+
with:
58+
distribution: 'oracle'
59+
java-version: '17'
60+
61+
- name: Cache Gradle Wrapper
62+
uses: actions/cache@v2
63+
with:
64+
path: ~/.gradle/wrapper
65+
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
66+
67+
- name: Cache Gradle Dependencies
68+
uses: actions/cache@v2
69+
with:
70+
path: ~/.gradle/caches
71+
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
72+
restore-keys: |
73+
${{ runner.os }}-gradle-caches-
74+
- name: Make Gradlew Executable
75+
run: cd android && chmod +x ./gradlew
76+
77+
- name: Build Android
78+
run: cd android && ./gradlew assembleDebug
79+
env:
80+
JVM_OPTS: '-Xmx4096m'
81+
82+
ios_build:
83+
runs-on: macOS-latest
84+
steps:
85+
- name: Checkout code
86+
uses: actions/checkout@v3
87+
88+
- name: Setup XCode
89+
uses: maxim-lobanov/setup-xcode@v1
90+
with:
91+
xcode-version: latest-stable
92+
93+
- name: Install Node.js
94+
uses: actions/setup-node@v4
95+
with:
96+
node-version: 18.x
97+
98+
- name: Install dependencies
99+
run: npm install -g yarn
100+
101+
- name: Install dependencies
102+
run: yarn install
103+
104+
- name: Install CocoaPods
105+
run: sudo gem install cocoapods
106+
107+
- name: Install iOS pods
108+
run: cd ios && pod install
109+
110+
- name: Build iOS
111+
run: npx react-native run-ios

.prettierrc.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module.exports = {
2-
bracketSpacing: true,
3-
jsxBracketSameLine: true,
4-
singleQuote: true,
5-
trailingComma: 'es5',
6-
tabWidth: 4,
7-
semi: true,
8-
printWidth: 190,
2+
bracketSpacing: true,
3+
jsxBracketSameLine: true,
4+
singleQuote: true,
5+
trailingComma: 'es5',
6+
tabWidth: 4,
7+
semi: true,
8+
printWidth: 190,
99
};

.watchmanconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

App.js

+24-19
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
* @flow strict-local
66
*/
77

8-
import 'react-native-gesture-handler';
9-
import React from 'react';
10-
import type { Node } from 'react';
11-
import { Platform, Text, View, ActivityIndicator } from 'react-native';
128
import { NavigationContainer } from '@react-navigation/native';
13-
import { createStackNavigator, TransitionPresets } from '@react-navigation/stack';
9+
import { createStackNavigator } from '@react-navigation/stack';
10+
import type { Node } from 'react';
11+
import React from 'react';
12+
import { ActivityIndicator, LogBox, Platform, Text, View } from 'react-native';
13+
import 'react-native-gesture-handler';
14+
import { SafeAreaProvider } from 'react-native-safe-area-context';
15+
import tailwind from 'tailwind';
1416
import CoreStack from './src/features/Core/CoreStack';
1517
import { config } from './src/utils';
16-
import tailwind from 'tailwind';
1718

1819
const isAndroid = Platform.OS === 'android';
1920
const Stack = createStackNavigator();
@@ -28,21 +29,25 @@ const linking = {
2829
};
2930

3031
const App: () => Node = () => {
32+
LogBox.ignoreLogs(['RCTUIManager.measureLayoutRelativeToParent']);
33+
3134
return (
32-
<NavigationContainer
33-
linking={linking}
34-
fallback={
35-
<View style={tailwind('bg-white flex items-center justify-center w-full h-full')}>
36-
<View style={tailwind('flex items-center justify-center')}>
37-
<ActivityIndicator style={tailwind('mb-4')} />
38-
<Text style={tailwind('text-gray-700')}>Loading...</Text>
35+
<SafeAreaProvider>
36+
<NavigationContainer
37+
linking={linking}
38+
fallback={
39+
<View style={tailwind('bg-white flex items-center justify-center w-full h-full')}>
40+
<View style={tailwind('flex items-center justify-center')}>
41+
<ActivityIndicator style={tailwind('mb-4')} />
42+
<Text style={tailwind('text-gray-700')}>Loading...</Text>
43+
</View>
3944
</View>
40-
</View>
41-
}>
42-
<Stack.Navigator>
43-
<Stack.Screen name="CoreStack" component={CoreStack} options={{ headerShown: false, animationEnabled: false, gestureEnabled: false }} />
44-
</Stack.Navigator>
45-
</NavigationContainer>
45+
}>
46+
<Stack.Navigator>
47+
<Stack.Screen name="CoreStack" component={CoreStack} options={{ headerShown: false, animationEnabled: false, gestureEnabled: false }} />
48+
</Stack.Navigator>
49+
</NavigationContainer>
50+
</SafeAreaProvider>
4651
);
4752
};
4853

0 commit comments

Comments
 (0)