Skip to content

Commit

Permalink
Updated to Expo 51 SDK (#228)
Browse files Browse the repository at this point in the history
* Updated to Expo 51 SDK, changed app directory structure and some package imports to match

* added filename to gitignore. updated eslint config so checks pass

* fixed @env linter errors

* another potential type fix to get tests to work

* added more potential type fixes for linter
  • Loading branch information
h1divp authored Aug 17, 2024
1 parent 42cd127 commit 5acc5ff
Show file tree
Hide file tree
Showing 39 changed files with 11,457 additions and 15,658 deletions.
3 changes: 2 additions & 1 deletion client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://docs.expo.dev/guides/using-eslint/
module.exports = {
extends: "universe/native",
extends: 'expo',
};
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FirebaseError } from "firebase/app";
import { User } from "firebase/auth";
import { FirebaseError } from "@firebase/app";
import { User } from "@firebase/auth";
import React from "react";
import { StyleSheet, Text, Dimensions, TouchableOpacity } from "react-native";

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const NearbyCount: React.FC<CounterProps> = ({ count }) => {
<View style={styles.iconAndCount}>
<Image
style={styles.iconImage}
source={require("../../../assets/nearby_icon.png")}
source={require("../../../assets/icons/misc/nearby_icon.png")}
/>
<Text style={styles.countText}>{count}</Text>
</View>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { API_KEY, AUTH_DOMAIN } from "@env"; // Don't worry about this env error!
import AsyncStorage from "@react-native-async-storage/async-storage";
import { initializeApp, getApp, getApps } from "firebase/app";
import { initializeApp, getApp, getApps } from "@firebase/app";
import {
initializeAuth,
getReactNativePersistence,
getAuth,
Auth,
} from "firebase/auth";
} from "@firebase/auth";

const firebaseConfig = {
apiKey: API_KEY || "Mock-Key",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 5 additions & 8 deletions client/App.tsx → client/app/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { NavigationContainer } from "@react-navigation/native";
import React from "react";
import { Text } from "react-native";

// Navigation
import AppNavigator from "./src/navigation/AppNavigator";
import AuthNavigator from "./src/navigation/AuthNavigator";
import AppNavigator from "./navigation/AppNavigator";
import AuthNavigator from "./navigation/AuthNavigator";
// Services/Hooks/Styles
import { AuthStore } from "./src/services/AuthStore";
import { useGlobalFonts } from "./src/styles/fonts";
import { AuthStore } from "./services/AuthStore";
import { useGlobalFonts } from "./styles/fonts";

const App = () => {
const { initialized, isLoggedin } = AuthStore.useState();
Expand All @@ -18,9 +17,7 @@ const App = () => {
if (!initialized) return <Text>Loading...</Text>;

return (
<NavigationContainer>
{isLoggedin ? <AppNavigator /> : <AuthNavigator />}
</NavigationContainer>
isLoggedin ? <AppNavigator /> : <AuthNavigator />
);
};

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
onAuthStateChanged,
signInWithEmailAndPassword,
signOut,
} from "firebase/auth";
} from "@firebase/auth";
import { Store } from "pullstate";

import { auth } from "../configs/firebaseConfig";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions client/app/types/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module '@env' {

export const EXPO_IP: string;
export const API_KEY, AUTH_DOMAIN, PROJECT_ID, STORAGE_BUCKET, MESSAGING_SENDER_ID, APP_ID: string;
}
File renamed without changes.
1 change: 0 additions & 1 deletion client/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module.exports = function (api) {
return {
presets: ["babel-preset-expo"],
plugins: [
"expo-router/babel",
[
"module:react-native-dotenv",
{
Expand Down
Loading

0 comments on commit 5acc5ff

Please sign in to comment.