Skip to content

Commit

Permalink
update expo
Browse files Browse the repository at this point in the history
  • Loading branch information
SamratSahoo committed Nov 13, 2024
1 parent 667d544 commit 62978b3
Show file tree
Hide file tree
Showing 8 changed files with 2,623 additions and 3,236 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,5 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

.env
.idea
.vscode
2 changes: 2 additions & 0 deletions mobile/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This env file can be exposed.
DEPLOY_CONTEXT="development"
3 changes: 2 additions & 1 deletion mobile/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { userGetUserInfo } from "./actions/User";
import { Role } from "./utils/types";
import { auth } from "./utils/firebase";
import PartnershipsScreen from "./screens/Onboarding/PartnershipsScreen";
import Config from "react-native-config";

SplashScreen.preventAutoHideAsync();

Expand All @@ -54,7 +55,7 @@ export default function App() {
}, [appIsReady]);

useEffect(() => {
if (process.env.NODE_ENV === "development") {
if (Config.DEPLOY_CONTEXT === "development") {
setInitialRoute(Screens.DEVELOPMENT_SCREEN);
setAppIsReady(true);
} else {
Expand Down
7 changes: 5 additions & 2 deletions mobile/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"newArchEnabled": true,
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
Expand All @@ -13,7 +14,9 @@
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"infoPlist": {
Expand Down Expand Up @@ -51,4 +54,4 @@
"package": "org.healing4heroes"
}
}
}
}
54 changes: 28 additions & 26 deletions mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,49 @@
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,scss}\""
},
"dependencies": {
"@expo/config": "~9.0.0",
"@expo/config": "^10.0.0",
"@expo/ngrok": "^4.1.0",
"@expo/webpack-config": "~19.0.1",
"@react-navigation/native": "^6.0.11",
"@react-navigation/native-stack": "^6.8.0",
"@react-navigation/stack": "^6.2.2",
"@shopify/react-native-skia": "~1.2.3",
"babel-preset-expo": "~11.0.0",
"@shopify/react-native-skia": "1.5.0",
"babel-preset-expo": "~12.0.0",
"crypto-browserify": "^3.12.0",
"dayjs": "^1.11.13",
"expo": "^51.0.0",
"expo-av": "~14.0.7",
"expo-constants": "~16.0.2",
"expo": "^52.0.5",
"expo-av": "~15.0.1",
"expo-constants": "~17.0.2",
"expo-doctor": "^1.10.1",
"expo-file-system": "~17.0.1",
"expo-haptics": "~13.0.1",
"expo-image-picker": "~15.0.7",
"expo-linking": "~6.3.1",
"expo-media-library": "~16.0.4",
"expo-splash-screen": "~0.27.5",
"expo-status-bar": "~1.12.1",
"expo-video-thumbnails": "~8.0.0",
"expo-file-system": "~18.0.3",
"expo-haptics": "~14.0.0",
"expo-image-picker": "~16.0.1",
"expo-linking": "~7.0.2",
"expo-media-library": "~17.0.2",
"expo-splash-screen": "~0.29.8",
"expo-status-bar": "~2.0.0",
"expo-video-thumbnails": "~9.0.2",
"firebase": "^9.9.4",
"mongoose": "^6.5.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.5",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.76.1",
"react-native-config": "^1.5.3",
"react-native-dropdown-picker": "^5.4.2",
"react-native-fiesta": "^0.7.0",
"react-native-get-random-values": "~1.11.0",
"react-native-reanimated": "~3.10.1",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1",
"react-native-svg": "15.2.0",
"react-native-web": "~0.19.10",
"react-native-reanimated": "~3.16.1",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.0.0",
"react-native-svg": "15.8.0",
"react-native-web": "~0.19.13",
"uuid": "^9.0.0",
"victory-native": "^36.6.8"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/core": "^7.26.0",
"@bitwarden/cli": "^2022.6.2",
"@types/react": "~18.2.79",
"@types/react": "~18.3.12",
"@types/react-native": "~0.70.6",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.33.0",
Expand All @@ -70,5 +71,6 @@
"prettier": "^2.7.1",
"typescript": "~5.3.3"
},
"private": true
}
"private": true,
"type": "commonjs"
}
23 changes: 10 additions & 13 deletions mobile/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import Config from "react-native-config";

let FIREBASE_API_KEY,
FIREBASE_AUTH_DOMAIN,
FIREBASE_PROJECT_ID,
FIREBASE_STORAGE_BUCKET,
FIREBASE_MESSAGING_SENDER_ID,
FIREBASE_APP_ID;
if (process.env.NODE_ENV === "production") {
// FIREBASE_API_KEY = "AIzaSyAJfZOc0HTD2nFQwPgvxJ67hzF4VF12Ut4";
// FIREBASE_AUTH_DOMAIN = "healing4heroes-bdd64.firebaseapp.com";
// FIREBASE_PROJECT_ID = "healing4heroes-bdd64";
// FIREBASE_STORAGE_BUCKET = "healing4heroes-bdd64.appspot.com";
// FIREBASE_MESSAGING_SENDER_ID = "241634063707";
// FIREBASE_APP_ID = "1:241634063707:web:e502d9385c22c44c7c567e";
FIREBASE_API_KEY = "AIzaSyD0uycogTnN_MEO6cKp0WEnGApVuKOFyys";
FIREBASE_AUTH_DOMAIN = "healing4heroes-f1bbb.firebaseapp.com";
FIREBASE_PROJECT_ID = "healing4heroes-f1bbb";
FIREBASE_STORAGE_BUCKET = "healing4heroes-f1bbb.appspot.com";
FIREBASE_MESSAGING_SENDER_ID = "873081765798";
FIREBASE_APP_ID = "1:873081765798:web:9e5869ae76832d28bc1967";

if (Config.DEPLOY_CONTEXT === "production") {
FIREBASE_API_KEY = "AIzaSyAJfZOc0HTD2nFQwPgvxJ67hzF4VF12Ut4";
FIREBASE_AUTH_DOMAIN = "healing4heroes-bdd64.firebaseapp.com";
FIREBASE_PROJECT_ID = "healing4heroes-bdd64";
FIREBASE_STORAGE_BUCKET = "healing4heroes-bdd64.appspot.com";
FIREBASE_MESSAGING_SENDER_ID = "241634063707";
FIREBASE_APP_ID = "1:241634063707:web:e502d9385c22c44c7c567e";
} else {
// Note these can be exposed
FIREBASE_API_KEY = "AIzaSyD0uycogTnN_MEO6cKp0WEnGApVuKOFyys";
Expand Down
12 changes: 2 additions & 10 deletions mobile/utils/urls.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
import Constants from "expo-constants";

const { manifest } = Constants;
import Config from "react-native-config";

function getBaseURL() {
if (process.env.NODE_ENV === "production") {
if (Config.DEPLOY_CONTEXT === "production") {
return `https://healing4heroes.netlify.app`;
}

return `https://healing4heroes-dev.netlify.app`;

// if (manifest?.debuggerHost) {
// return `http://${manifest?.debuggerHost?.split(":").shift()}:3000`;
// } else {
// return "http://localhost:3000";
// }
}

export const urls = {
Expand Down
Loading

0 comments on commit 62978b3

Please sign in to comment.