Skip to content

Commit

Permalink
v0.0.8 (#29)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
tortuvshin authored Mar 12, 2024
1 parent 666e119 commit 62638e5
Show file tree
Hide file tree
Showing 103 changed files with 46,785 additions and 21,762 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
root: true,
extends: '@react-native-community',
root: true,
extends: '@react-native-community',
rules: {
'react/prop-types': 'off',
},
};
203 changes: 104 additions & 99 deletions .github/workflows/react-native-ci.yml
Original file line number Diff line number Diff line change
@@ -1,106 +1,111 @@
name: Storefront App CI

on:
pull_request:
branches: [ main ] # Trigger for PRs to main branch
pull_request:
branches: [main] # Trigger for PRs to main branch

env:
FLEETBASE_KEY: ${{ secrets.FLEETBASE_KEY }}
GOOGLE_MAPS_KEY: ${{ secrets.GOOGLE_MAPS_KEY }}
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
FLEETBASE_KEY: ${{ secrets.FLEETBASE_KEY }}
GOOGLE_MAPS_KEY: ${{ secrets.GOOGLE_MAPS_KEY }}
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}

jobs:
install_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x

- name: Install dependencies
run: npm install -g yarn

- name: Install dependencies
run: yarn install

android_build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Generate google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.STOREFRONT_GOOGLE_SERVICES_JSON }}
run: |
echo "$GOOGLE_SERVICES_JSON" > google-services.json
mkdir -p android/app/src
mv google-services.json android/app/src
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x

- name: Install dependencies
run: npm install -g yarn

- name: Install dependencies
run: yarn install

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '17'

- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew

- name: Build Android
run: cd android && ./gradlew assembleDebug
env:
JVM_OPTS: '-Xmx4096m'

ios_build:
runs-on: macOS-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Install dependencies
run: npm install -g yarn

- name: Install dependencies
run: yarn install

- name: Install CocoaPods
run: sudo gem install cocoapods

- name: Install iOS pods
run: cd ios && pod install

- name: Build iOS
run: npx react-native run-ios --configuration Release
install_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x

- name: Install dependencies
run: npm install -g yarn

- name: Install dependencies
run: yarn install

android_build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Generate google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.STOREFRONT_GOOGLE_SERVICES_JSON }}
run: |
echo "$GOOGLE_SERVICES_JSON" > google-services.json
mkdir -p android/app/src
mv google-services.json android/app/src
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x

- name: Install dependencies
run: npm install -g yarn

- name: Install dependencies
run: yarn install

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '17'

- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew

- name: Build Android
run: cd android && ./gradlew assembleDebug
env:
JVM_OPTS: '-Xmx4096m'

ios_build:
runs-on: macOS-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup XCode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Install dependencies
run: npm install -g yarn

- name: Install dependencies
run: yarn install

- name: Install CocoaPods
run: sudo gem install cocoapods

- name: Install iOS pods
run: cd ios && pod install

- name: Build iOS
run: npx react-native run-ios
14 changes: 7 additions & 7 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
bracketSpacing: true,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'es5',
tabWidth: 4,
semi: true,
printWidth: 190,
bracketSpacing: true,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'es5',
tabWidth: 4,
semi: true,
printWidth: 190,
};
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
43 changes: 24 additions & 19 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
* @flow strict-local
*/

import 'react-native-gesture-handler';
import React from 'react';
import type { Node } from 'react';
import { Platform, Text, View, ActivityIndicator } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator, TransitionPresets } from '@react-navigation/stack';
import { createStackNavigator } from '@react-navigation/stack';
import type { Node } from 'react';
import React from 'react';
import { ActivityIndicator, LogBox, Platform, Text, View } from 'react-native';
import 'react-native-gesture-handler';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import tailwind from 'tailwind';
import CoreStack from './src/features/Core/CoreStack';
import { config } from './src/utils';
import tailwind from 'tailwind';

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

const App: () => Node = () => {
LogBox.ignoreLogs(['RCTUIManager.measureLayoutRelativeToParent']);

return (
<NavigationContainer
linking={linking}
fallback={
<View style={tailwind('bg-white flex items-center justify-center w-full h-full')}>
<View style={tailwind('flex items-center justify-center')}>
<ActivityIndicator style={tailwind('mb-4')} />
<Text style={tailwind('text-gray-700')}>Loading...</Text>
<SafeAreaProvider>
<NavigationContainer
linking={linking}
fallback={
<View style={tailwind('bg-white flex items-center justify-center w-full h-full')}>
<View style={tailwind('flex items-center justify-center')}>
<ActivityIndicator style={tailwind('mb-4')} />
<Text style={tailwind('text-gray-700')}>Loading...</Text>
</View>
</View>
</View>
}>
<Stack.Navigator>
<Stack.Screen name="CoreStack" component={CoreStack} options={{ headerShown: false, animationEnabled: false, gestureEnabled: false }} />
</Stack.Navigator>
</NavigationContainer>
}>
<Stack.Navigator>
<Stack.Screen name="CoreStack" component={CoreStack} options={{ headerShown: false, animationEnabled: false, gestureEnabled: false }} />
</Stack.Navigator>
</NavigationContainer>
</SafeAreaProvider>
);
};

Expand Down
Loading

0 comments on commit 62638e5

Please sign in to comment.