Skip to content

Commit

Permalink
Merge pull request #82 from deonneon/master
Browse files Browse the repository at this point in the history
upgrade from Expo 46 to 49
  • Loading branch information
amandeepmittal authored Mar 27, 2024
2 parents fc11609 + 9759f1d commit f191669
Show file tree
Hide file tree
Showing 4 changed files with 6,437 additions and 3,561 deletions.
35 changes: 21 additions & 14 deletions config/firebase.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
import { initializeApp } from 'firebase/app';
import { initializeAuth, getReactNativePersistence } from 'firebase/auth';
import Constants from 'expo-constants';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { initializeApp } from "firebase/app";
// import { initializeAuth, getReactNativePersistence } from "firebase/auth";
import { initializeAuth } from "firebase/auth";
import Constants from "expo-constants";
// import AsyncStorage from "@react-native-async-storage/async-storage";

// add firebase config
const firebaseConfig = {
apiKey: Constants.manifest.extra.apiKey,
authDomain: Constants.manifest.extra.authDomain,
projectId: Constants.manifest.extra.projectId,
storageBucket: Constants.manifest.extra.storageBucket,
messagingSenderId: Constants.manifest.extra.messagingSenderId,
appId: Constants.manifest.extra.appId,
apiKey: Constants.expoConfig?.extra?.apiKey,
authDomain: Constants.expoConfig?.extra?.authDomain,
projectId: Constants.expoConfig?.extra?.projectId,
storageBucket: Constants.expoConfig?.extra?.storageBucket,
messagingSenderId: Constants.expoConfig?.extra?.messagingSenderId,
appId: Constants.expoConfig?.extra?.appId,
};

// initialize firebase
const app = initializeApp(firebaseConfig);

// initialize auth
const auth = initializeAuth(app, {
persistence: getReactNativePersistence(AsyncStorage),
});
//
// Need to upgrade to Expo with typescrip inorder getReactNativePersistence to work.
//

//initialize auth
// const auth = initializeAuth(app, {
// persistence: getReactNativePersistence(AsyncStorage),
// });

const auth = initializeAuth(app);

export { auth };
10 changes: 10 additions & 0 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Learn more https://docs.expo.dev/guides/customizing-metro/
const { getDefaultConfig } = require("expo/metro-config");

/** @type {import('expo/metro-config').MetroConfig} */
const defaultConfig = getDefaultConfig(__dirname);
defaultConfig.resolver.sourceExts.push("cjs");

defaultConfig.resolver.mainFields = ["react-native", "browser", "main"];

module.exports = defaultConfig;
37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,31 @@
"eject": "expo eject"
},
"dependencies": {
"@react-native-async-storage/async-storage": "~1.17.3",
"@react-native-masked-view/masked-view": "0.2.7",
"@react-navigation/native": "^6.0.11",
"@react-navigation/stack": "^6.2.2",
"@expo/webpack-config": "^19.0.0",
"@react-native-async-storage/async-storage": "1.18.2",
"@react-native-masked-view/masked-view": "^0.2.7",
"@react-navigation/native": "^6.1.16",
"@react-navigation/stack": "^6.3.28",
"dotenv": "^10.0.0",
"expo": "^46.0.0",
"expo-constants": "~13.2.3",
"firebase": "9.6.11",
"expo": "^49.0.15",
"expo-constants": "~14.4.2",
"firebase": "^10.5.2",
"formik": "2.1.4",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.4",
"react-native-gesture-handler": "~2.5.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.72.10",
"react-native-gesture-handler": "2.12.0",
"react-native-keyboard-aware-scroll-view": "^0.9.4",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-web": "~0.18.7",
"yup": "0.27.0"
"react-native-reanimated": "3.3.0",
"react-native-safe-area-context": "4.6.3",
"react-native-screens": "3.22.0",
"react-native-web": "0.19.10",
"yup": "^0.27.0"
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@babel/core": "^7.20.0",
"@babel/runtime": "^7.9.0",
"babel-preset-expo": "~9.2.0"
"babel-preset-expo": "^9.5.0",
},
"private": true
}
Loading

0 comments on commit f191669

Please sign in to comment.