Skip to content

Commit 6546e69

Browse files
committed
Fixed workflow and import aliases
1 parent 2b02eef commit 6546e69

19 files changed

Lines changed: 468 additions & 206 deletions

app/_layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
import { Stack } from "expo-router";
33

44
// firebase stuff
5-
import { auth } from "@/auth/firebase";
5+
import { auth } from "@auth/firebase";
66
import { onAuthStateChanged, User } from "firebase/auth";
77

88
//react and expo
99
import { useEffect, useState } from 'react';
1010

1111
//contexts
12-
import { ModalProvider } from "@/contexts/modalContext";
13-
import { UserDataProvider } from "@/contexts/userContext";
12+
import { ModalProvider } from "@contexts/modalContext";
13+
import { UserDataProvider } from "@contexts/userContext";
1414

1515

1616
export default function RootLayout() {

app/auth/forgotPass.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//components
2-
import CustomText from "@/components/display/customText";
3-
import { View, StyleSheet } from "react-native";
4-
import InputBox from "@/components/inputs/inptField";
5-
import OnlyIconButton from "@/components/inputs/onlyIconButton";
6-
import CustomButton from "@/components/inputs/customButton";
2+
import CustomText from "@components/display/customText";
3+
import CustomButton from "@components/inputs/customButton";
4+
import InputBox from "@components/inputs/inptField";
5+
import OnlyIconButton from "@components/inputs/onlyIconButton";
6+
import { StyleSheet, View } from "react-native";
77

88
//firebase
9+
import { auth } from '@auth/firebase';
910
import { sendPasswordResetEmail, } from "firebase/auth";
10-
import { auth } from '@/auth/firebase';
1111

1212
//react
1313
import { useState } from "react";

app/auth/login.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
//components
2-
import { View, StyleSheet } from "react-native";
3-
import InputBox from "@/components/inputs/inptField";
4-
import IconButton from "@/components/inputs/IconButton";
5-
import CustomText from "@/components/display/customText";
6-
import CustomButton from "@/components/inputs/customButton";
2+
import CustomText from "@components/display/customText";
3+
import CustomButton from "@components/inputs/customButton";
4+
import IconButton from "@components/inputs/IconButton";
5+
import InputBox from "@components/inputs/inptField";
6+
import { StyleSheet, View } from "react-native";
77

88
//firebase
99
import { signInWithEmailAndPassword } from "firebase/auth";
1010

1111
//contexts
12+
import { auth } from '@auth/firebase';
1213
import { useModalContext } from "../../src/contexts/modalContext";
13-
import { auth } from '@/auth/firebase';
1414

1515
//func
16-
import { handleSlackLogin } from "@/utils/otherUtils";
16+
import { handleSlackLogin } from "@utils/otherUtils";
1717

1818
//react
1919
import { useState } from "react";

app/auth/signup.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
//components
2-
import { ScrollView, View, StyleSheet, RefreshControl } from "react-native";
3-
import InputBox from "@/components/inputs/inptField";
4-
import CustomText from "@/components/display/customText";
5-
import CustomButton from "@/components/inputs/customButton";
6-
import IconButton from "@/components/inputs/IconButton";
2+
import CustomText from "@components/display/customText";
3+
import CustomButton from "@components/inputs/customButton";
4+
import IconButton from "@components/inputs/IconButton";
5+
import InputBox from "@components/inputs/inptField";
6+
import { RefreshControl, ScrollView, StyleSheet, View } from "react-native";
77

88
//react
99
import React, { useState, } from "react";
1010

1111
//firebase
12+
import { auth, db } from '@auth/firebase';
1213
import { createUserWithEmailAndPassword, sendEmailVerification, updateProfile } from "firebase/auth";
13-
import { auth, db } from '@/auth/firebase';
1414
import { doc, setDoc } from "firebase/firestore";
1515

1616
//contexts
1717
import { useModalContext } from "../../src/contexts/modalContext";
1818

1919
//func
20-
import { handleSlackLogin } from "@/utils/otherUtils";
20+
import { handleSlackLogin } from "@utils/otherUtils";
2121
import { useRouter } from "expo-router";
2222

2323

babel.config.js

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,27 @@ module.exports = function (api) {
33
return {
44
presets: ['babel-preset-expo'],
55
plugins: [
6+
// React Native reanimated plugin (if you use reanimated)
7+
'react-native-reanimated/plugin',
8+
9+
// Optional - Plugin transform for optimization
610
[
711
'module-resolver',
812
{
13+
root: ['./src'],
14+
extensions: ['.ios.js', '.android.js', '.js', '.ts', '.tsx', '.json'],
915
alias: {
10-
'@': './src'
11-
}
12-
}
13-
]
14-
]
16+
'@components': './src/components',
17+
'@screens': './src/screens',
18+
'@utils': './src/utils',
19+
'@hooks': './src/hooks',
20+
'@assets': './assets',
21+
},
22+
},
23+
],
24+
25+
// Optional - For using decorators
26+
['@babel/plugin-proposal-decorators', { legacy: true }],
27+
],
1528
};
1629
};

metro.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const { getDefaultConfig } = require('expo/metro-config');
2+
3+
const config = getDefaultConfig(__dirname);
4+
5+
// Add SVG support
6+
const { transformer, resolver } = config;
7+
8+
config.transformer = {
9+
...transformer,
10+
babelTransformerPath: require.resolve('react-native-svg-transformer/expo'),
11+
};
12+
13+
config.resolver = {
14+
...resolver,
15+
assetExts: resolver.assetExts.filter(ext => ext !== 'svg'),
16+
sourceExts: [...resolver.sourceExts, 'svg'],
17+
};
18+
19+
module.exports = config;

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"expo-system-ui": "~5.0.11",
3636
"expo-video": "^2.2.2",
3737
"expo-web-browser": "~14.2.0",
38-
"firebase": "^12.1.0",
38+
"firebase": "^12.2.1",
3939
"react": "19.0.0",
4040
"react-dom": "19.0.0",
4141
"react-native": "0.79.5",
@@ -46,6 +46,7 @@
4646
"react-native-safe-area-context": "5.4.0",
4747
"react-native-screens": "~4.11.1",
4848
"react-native-svg": "15.11.2",
49+
"react-native-svg-transformer": "^1.5.1",
4950
"react-native-vector-icons": "^10.3.0",
5051
"react-native-web": "~0.20.0",
5152
"react-native-webview": "13.13.5"
@@ -58,4 +59,4 @@
5859
"typescript": "~5.8.3"
5960
},
6061
"private": true
61-
}
62+
}

src/auth/firebase.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
// Import the functions you need from the SDKs you need
21
import { initializeApp } from "firebase/app";
2+
import { getReactNativePersistence, initializeAuth } from 'firebase/auth';
33
import { doc, getDoc, getFirestore } from "firebase/firestore";
4-
import { initializeAuth, getReactNativePersistence } from 'firebase/auth';
54

65
import ReactNativeAsyncStorage from '@react-native-async-storage/async-storage';
76

@@ -42,4 +41,4 @@ async function getUserData(collection: string, uid: string) {
4241
}
4342
}
4443

45-
export { auth, db, getUserData };
44+
export { auth, db, getUserData };

src/components/alerts/activity.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import CustomText from "@/components/display/customText";
1+
import CustomText from "@components/display/customText";
22
import { BlurView } from "expo-blur";
33
import { Modal, SafeAreaView, StyleSheet, View } from "react-native";
44
import { Bar } from 'react-native-progress';

src/components/alerts/modal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import CustomText from "@components/display/customText";
12
import MaterialDesignIcons from "@react-native-vector-icons/material-design-icons";
2-
import { Modal, View, Pressable, StyleSheet, SafeAreaView } from "react-native";
33
import { BlurView } from 'expo-blur';
4-
import CustomText from "@/components/display/customText";
4+
import { Modal, Pressable, SafeAreaView, StyleSheet, View } from "react-native";
55

66

77
interface Props {

0 commit comments

Comments
 (0)