Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 18

- name: Install Yarn
run: npm install -g yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 18

- name: Install Yarn
run: npm install -g yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 18

- name: Install Expo CLI
run: npm install -g expo-cli
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.19.3
lts/hydrogen
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This application is supported by Rize in a web environment so you may need to ma

## Prerequisites

- NodeJS v12 and up
- NodeJS v18 and up
- Check [nvm](https://github.com/creationix/nvm) to manage multiple versions of node/npm on your local
- Expo CLI version `3.27.8`
- [Git](https://git-scm.com/)
Expand All @@ -30,7 +30,7 @@ This application is supported by Rize in a web environment so you may need to ma
- [iOS Simulator (macOS only)](https://docs.expo.io/workflow/ios-simulator/)
- [Android Emulator](https://docs.expo.io/workflow/android-studio-emulator/)

## Recommeded Tools
## Recommended Tools

- [VSCode Editor](https://code.visualstudio.com/download)
- [Yarn](https://classic.yarnpkg.com/en/docs/install)
Expand Down
136 changes: 68 additions & 68 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,87 +18,87 @@
"preset": "jest-expo"
},
"dependencies": {
"@expo/vector-icons": "^12.0.0",
"@react-native-async-storage/async-storage": "~1.15.0",
"@react-native-community/datetimepicker": "3.5.2",
"@react-native-community/masked-view": "0.1.10",
"@react-native-picker/picker": "2.1.0",
"@react-navigation/bottom-tabs": "5.11.2",
"@react-navigation/native": "~5.8.10",
"@react-navigation/stack": "~5.12.8",
"@rizefinance/rize-js": "^1.6.0",
"@types/jest": "^27.0.1",
"@xstate/react": "^1.6.3",
"axios": "^0.21.2",
"date-fns": "^2.28.0",
"dotenv": "^8.2.0",
"expo": "^43.0.0",
"expo-application": "~4.0.0",
"expo-asset": "~8.4.3",
"expo-cli": "^5.4.9",
"expo-constants": "~12.1.3",
"expo-device": "~4.0.3",
"expo-font": "~10.0.3",
"expo-linking": "~2.4.2",
"expo-network": "~4.0.3",
"expo-splash-screen": "~0.13.5",
"expo-status-bar": "~1.1.0",
"expo-updates": "~0.10.15",
"expo-web-browser": "~10.0.3",
"@expo/vector-icons": "^13.0.0",
"@expo/webpack-config": "^18.0.2",
"@react-native-async-storage/async-storage": "~1.18.0",
"@react-native-community/datetimepicker": "7.0.0",
"@react-native-masked-view/masked-view": "^0.2.8",
"@react-native-picker/picker": "2.4.9",
"@react-navigation/bottom-tabs": "6.5.7",
"@react-navigation/native": "~6.1.6",
"@react-navigation/stack": "~6.3.16",
"@rizefinance/rize-js": "^1.9.1",
"@types/jest": "^29.5.0",
"@xstate/react": "^3.2.1",
"axios": "^1.3.4",
"date-fns": "^2.29.3",
"dotenv": "^16.0.3",
"expo": "^48.0.9",
"expo-application": "~5.1.1",
"expo-asset": "~8.9.1",
"expo-constants": "~14.2.1",
"expo-device": "~5.2.1",
"expo-font": "~11.1.1",
"expo-linking": "~4.0.1",
"expo-network": "~5.2.1",
"expo-splash-screen": "~0.18.1",
"expo-status-bar": "~1.4.4",
"expo-updates": "~0.16.3",
"expo-web-browser": "~12.1.1",
"format-string-by-pattern": "^1.2.2",
"formik": "^2.2.9",
"imask": "^6.4.2",
"imask": "^6.4.3",
"lodash": "^4.17.21",
"modal-enhanced-react-native-web": "^0.2.0",
"moment": "^2.29.1",
"query-string": "^7.0.1",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-gesture-handler": "~1.10.2",
"moment": "^2.29.4",
"query-string": "^8.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.71.4",
"react-native-gesture-handler": "~2.9.0",
"react-native-masked-text": "^1.13.0",
"react-native-picker-select": "^8.0.4",
"react-native-reanimated": "~2.2.0",
"react-native-redash": "^16.2.3",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.8.0",
"react-native-reanimated": "~3.0.2",
"react-native-redash": "^18.1.0",
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "~3.20.0",
"react-native-simple": "^1.3.0",
"react-native-sortable-list": "^0.0.24",
"react-native-svg": "12.1.1",
"react-native-web": "0.17.1",
"react-native-webview": "11.13.0",
"react-plaid-link": "^3.1.0",
"sentry-expo": "^4.0.0",
"validator": "^13.5.2",
"xstate": "^4.26.1",
"yup": "^0.32.9"
"react-native-sortable-list": "^0.0.25",
"react-native-svg": "13.8.0",
"react-native-web": "~0.18.10",
"react-native-webview": "11.26.1",
"react-plaid-link": "^3.4.0",
"sentry-expo": "^6.1.1",
"validator": "^13.9.0",
"xstate": "^4.37.1",
"yup": "^1.0.2"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@types/lodash": "^4.14.168",
"@babel/core": "^7.21.3",
"@types/lodash": "^4.14.192",
"@types/moment": "^2.13.0",
"@types/query-string": "^6.3.0",
"@types/react": "~17.0.21",
"@types/react-native": "~0.64.12",
"@types/validator": "^13.1.3",
"@types/yup": "^0.29.11",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"eslint": "^7.21.0",
"@types/react": "~18.0.31",
"@types/react-native": "~0.71.5",
"@types/validator": "^13.7.14",
"@types/yup": "^0.32.0",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"eslint": "^8.37.0",
"eslint-config-react": "^1.1.7",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "^7.0.2",
"jest-expo": "~43.0.1",
"lint-staged": "^11.1.2",
"msw": "^0.39.2",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.3",
"jest-expo": "~48.0.2",
"lint-staged": "^13.2.0",
"msw": "^1.2.1",
"precise-commits": "^1.0.2",
"prettier": "2.4.0",
"pretty-quick": "^3.1.1",
"react-native-svg-transformer": "^0.14.3",
"tsconfig-paths": "^3.12.0",
"typescript": "~4.3.5"
"prettier": "2.8.7",
"pretty-quick": "^3.1.3",
"react-native-svg-transformer": "^1.0.0",
"tsconfig-paths": "^4.1.2",
"typescript": "~5.0.2"
},
"private": true,
"lint-staged": {
Expand Down
14 changes: 9 additions & 5 deletions screens/LoginScreen/LoginScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ export default function LoginScreen({ navigation, route }: LoginScreenProps): JS
useEffect(() => {
const fetchCustomer = async () => {
if (auth.accessToken !== '') {
const customer = await CustomerService.getCustomer(auth.accessToken);
if (customer) {
setCustomer(customer);
} else {
removeValue({ storageKey: '@tokens' });
try {
const customer = await CustomerService.getCustomer(auth.accessToken);
if (customer) {
setCustomer(customer);
} else {
removeValue({ storageKey: '@tokens' });
}
} catch (err) {
setCommonError(`Error fetching customer! \n ${err || 'Try again later'}`);
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion utils/toQueryString.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const querystring = require('query-string');
import querystring from 'query-string';

const toQueryString = (
object: Record<string, unknown>,
Expand Down
13 changes: 13 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const createExpoWebpackConfigAsync = require('@expo/webpack-config');

module.exports = async function (env, argv) {
const config = await createExpoWebpackConfigAsync(env, argv);

// Development mode settings
if (config.mode === 'development') {
config.devtool = 'eval-source-map';
config.devServer.compress = false;
}

return config;
};
Loading