diff --git a/client/App.tsx b/client/App.tsx index acc9c036a..4e275ac10 100644 --- a/client/App.tsx +++ b/client/App.tsx @@ -4,10 +4,14 @@ import { AuthStore } from "./src/services/AuthStore"; import { NavigationContainer } from "@react-navigation/native"; import AppNavigator from "./src/navigation/AppNavigator"; import AuthNavigator from "./src/navigation/AuthNavigator"; +import { useGlobalFonts } from "./src/styles/fonts"; const App = () => { const { initialized, isLoggedin } = AuthStore.useState(); + const { fontsLoaded, fontError } = useGlobalFonts(); + + if (!fontsLoaded && !fontError) return Error Loading Fonts!; if (!initialized) return Loading...; diff --git a/client/assets/airplaneSend.png b/client/assets/airplaneSend.png deleted file mode 100644 index a4765fb9f..000000000 Binary files a/client/assets/airplaneSend.png and /dev/null differ diff --git a/client/assets/city_buildings.png b/client/assets/city_buildings.png deleted file mode 100644 index 1b9ea08b6..000000000 Binary files a/client/assets/city_buildings.png and /dev/null differ diff --git a/client/assets/cute_tree_cropped.png b/client/assets/cute_tree_cropped.png deleted file mode 100644 index 565b59f58..000000000 Binary files a/client/assets/cute_tree_cropped.png and /dev/null differ diff --git a/client/assets/angle-right.png b/client/assets/icons/arrow/angle-right.png similarity index 100% rename from client/assets/angle-right.png rename to client/assets/icons/arrow/angle-right.png diff --git a/client/assets/send.png b/client/assets/icons/arrow/send.png similarity index 100% rename from client/assets/send.png rename to client/assets/icons/arrow/send.png diff --git a/client/assets/transparentSend.png b/client/assets/icons/arrow/transparentSend.png similarity index 100% rename from client/assets/transparentSend.png rename to client/assets/icons/arrow/transparentSend.png diff --git a/client/assets/apple_logo.png b/client/assets/icons/auth/apple_logo.png similarity index 100% rename from client/assets/apple_logo.png rename to client/assets/icons/auth/apple_logo.png diff --git a/client/assets/facebook_logo.png b/client/assets/icons/auth/facebook_logo.png similarity index 100% rename from client/assets/facebook_logo.png rename to client/assets/icons/auth/facebook_logo.png diff --git a/client/assets/github_logo.png b/client/assets/icons/auth/github_logo.png similarity index 100% rename from client/assets/github_logo.png rename to client/assets/icons/auth/github_logo.png diff --git a/client/assets/google_logo.png b/client/assets/icons/auth/google_logo.png similarity index 100% rename from client/assets/google_logo.png rename to client/assets/icons/auth/google_logo.png diff --git a/client/assets/adaptive-icon.png b/client/assets/icons/expo/adaptive-icon.png similarity index 100% rename from client/assets/adaptive-icon.png rename to client/assets/icons/expo/adaptive-icon.png diff --git a/client/assets/favicon.png b/client/assets/icons/expo/favicon.png similarity index 100% rename from client/assets/favicon.png rename to client/assets/icons/expo/favicon.png diff --git a/client/assets/icon.png b/client/assets/icons/expo/icon.png similarity index 100% rename from client/assets/icon.png rename to client/assets/icons/expo/icon.png diff --git a/client/assets/splash.png b/client/assets/icons/expo/splash.png similarity index 100% rename from client/assets/splash.png rename to client/assets/icons/expo/splash.png diff --git a/client/assets/nearby_icon.png b/client/assets/icons/misc/nearby_icon.png similarity index 100% rename from client/assets/nearby_icon.png rename to client/assets/icons/misc/nearby_icon.png diff --git a/client/assets/user_icons/face_01.png b/client/assets/icons/user/face_01.png similarity index 100% rename from client/assets/user_icons/face_01.png rename to client/assets/icons/user/face_01.png diff --git a/client/assets/user_icons/face_02.png b/client/assets/icons/user/face_02.png similarity index 100% rename from client/assets/user_icons/face_02.png rename to client/assets/icons/user/face_02.png diff --git a/client/assets/user_icons/face_03.png b/client/assets/icons/user/face_03.png similarity index 100% rename from client/assets/user_icons/face_03.png rename to client/assets/icons/user/face_03.png diff --git a/client/assets/user_icons/face_04.png b/client/assets/icons/user/face_04.png similarity index 100% rename from client/assets/user_icons/face_04.png rename to client/assets/icons/user/face_04.png diff --git a/client/assets/user_icons/face_05.png b/client/assets/icons/user/face_05.png similarity index 100% rename from client/assets/user_icons/face_05.png rename to client/assets/icons/user/face_05.png diff --git a/client/assets/user_icons/face_06.png b/client/assets/icons/user/face_06.png similarity index 100% rename from client/assets/user_icons/face_06.png rename to client/assets/icons/user/face_06.png diff --git a/client/assets/user_icons/face_07.png b/client/assets/icons/user/face_07.png similarity index 100% rename from client/assets/user_icons/face_07.png rename to client/assets/icons/user/face_07.png diff --git a/client/assets/user_icons/face_08.png b/client/assets/icons/user/face_08.png similarity index 100% rename from client/assets/user_icons/face_08.png rename to client/assets/icons/user/face_08.png diff --git a/client/assets/user_icons/fake_pfp.jpg b/client/assets/icons/user/fake_pfp.jpg similarity index 100% rename from client/assets/user_icons/fake_pfp.jpg rename to client/assets/icons/user/fake_pfp.jpg diff --git a/client/assets/talking_location.png b/client/assets/images/vector/talking_location.png similarity index 100% rename from client/assets/talking_location.png rename to client/assets/images/vector/talking_location.png diff --git a/client/assets/paper-plane.png b/client/assets/paper-plane.png deleted file mode 100644 index e7a167b6b..000000000 Binary files a/client/assets/paper-plane.png and /dev/null differ diff --git a/client/assets/temp_front_page_icon.png b/client/assets/temp_front_page_icon.png deleted file mode 100644 index 8ee0c9368..000000000 Binary files a/client/assets/temp_front_page_icon.png and /dev/null differ diff --git a/client/assets/transfer.png b/client/assets/transfer.png deleted file mode 100644 index 14267ab1b..000000000 Binary files a/client/assets/transfer.png and /dev/null differ diff --git a/client/src/app_DEPRECATED/(auth)/_layout.tsx b/client/src/app_DEPRECATED/(auth)/_layout.tsx deleted file mode 100644 index e650a2793..000000000 --- a/client/src/app_DEPRECATED/(auth)/_layout.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from "react"; -import { Stack } from "expo-router"; - -const PublicLayout = () => { - return ( - - - - - - - ) -} - -export default PublicLayout \ No newline at end of file diff --git a/client/src/app_DEPRECATED/(auth)/login.tsx b/client/src/app_DEPRECATED/(auth)/login.tsx deleted file mode 100644 index 37ff42002..000000000 --- a/client/src/app_DEPRECATED/(auth)/login.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import LogIn from "../../screens/auth/LoginScreen"; - -const LoginPage = () => { - return ; -}; - -export default LoginPage; diff --git a/client/src/app_DEPRECATED/(auth)/resetpass.tsx b/client/src/app_DEPRECATED/(auth)/resetpass.tsx deleted file mode 100644 index 7bc854e5e..000000000 --- a/client/src/app_DEPRECATED/(auth)/resetpass.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react' -import { View, Text, StyleSheet } from 'react-native'; - -const ResetPage = () => { - return ( - - This is where the password reset goes! - - ) -} - -const tempStyles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center' - } -}); - -export default ResetPage; \ No newline at end of file diff --git a/client/src/app_DEPRECATED/(auth)/signup.tsx b/client/src/app_DEPRECATED/(auth)/signup.tsx deleted file mode 100644 index b872ed28a..000000000 --- a/client/src/app_DEPRECATED/(auth)/signup.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import SignUp from "../../screens/auth/SignUpScreen"; - -const SignUpPage = () => { - return ; -}; - -export default SignUpPage; diff --git a/client/src/app_DEPRECATED/(auth)/welcome.tsx b/client/src/app_DEPRECATED/(auth)/welcome.tsx deleted file mode 100644 index f58ea6738..000000000 --- a/client/src/app_DEPRECATED/(auth)/welcome.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from "react"; -import WelcomeScreen from "../../screens/auth/WelcomeScreen"; -import { router } from "expo-router"; -import SafeAreaWrapper from "../../components/common/SafeAreaWrapper"; - -const WelcomePage = () => { - return ( - - - - ); -}; - -export default WelcomePage; diff --git a/client/src/app_DEPRECATED/(home)/_layout.tsx b/client/src/app_DEPRECATED/(home)/_layout.tsx deleted file mode 100644 index fb7c6336c..000000000 --- a/client/src/app_DEPRECATED/(home)/_layout.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react"; -import { Stack } from "expo-router"; -import { SettingsProvider } from "../../contexts/SettingsContext"; -import { SocketProvider } from "../../contexts/SocketContext"; -import { LocationProvider } from "../../contexts/LocationContext"; -import { UserProvider } from "../../contexts/UserContext"; - -const AuthLayout = () => { - return ( - - - - - - - - - - - - ); -}; - -export default AuthLayout; diff --git a/client/src/app_DEPRECATED/(home)/chatchannel.tsx b/client/src/app_DEPRECATED/(home)/chatchannel.tsx deleted file mode 100644 index b7a0be65f..000000000 --- a/client/src/app_DEPRECATED/(home)/chatchannel.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from "react"; -import { Stack } from "expo-router"; -import ChatScreen from "../../screens/chat/ChatScreen"; -import SafeAreaWrapper from "../../components/common/SafeAreaWrapper"; - -const ChatroomPage = () => { - return ( - - - - ); -}; - -export default ChatroomPage; diff --git a/client/src/app_DEPRECATED/_layout.tsx b/client/src/app_DEPRECATED/_layout.tsx deleted file mode 100644 index 7a2bf6cdb..000000000 --- a/client/src/app_DEPRECATED/_layout.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { Slot } from "expo-router"; - -const RootLayout = () => { - return ; -}; - -export default RootLayout; diff --git a/client/src/app_DEPRECATED/index.tsx b/client/src/app_DEPRECATED/index.tsx deleted file mode 100644 index a8774f768..000000000 --- a/client/src/app_DEPRECATED/index.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React, { useEffect, useState, useContext } from "react"; -import { View, Text } from "react-native"; -import { AuthStore } from "../services/AuthStore"; -import { useRootNavigationState, useRouter, useSegments } from "expo-router"; - -const App = () => { - const { initialized, isLoggedin } = AuthStore.useState(); - const router = useRouter(); - const segments = useSegments(); - const navigationState = useRootNavigationState(); - - useEffect(() => { - if (!navigationState?.key || !initialized) return; - - if (!isLoggedin) { - router.replace("/welcome"); - } else if (isLoggedin) { - router.replace("/chatchannel"); - } - }, [segments, navigationState?.key, initialized]); - - return ( - - Loading screen - - ); - // replace this div with one of the pages inside this directory (eg. ChatroomPage in chatchannel.tsx) -}; - -export default App; diff --git a/client/src/components/auth/AuthButtons.tsx b/client/src/components/auth/AuthButtons.tsx index cd733dd8f..b13f2251c 100644 --- a/client/src/components/auth/AuthButtons.tsx +++ b/client/src/components/auth/AuthButtons.tsx @@ -10,22 +10,14 @@ import { ImageSourcePropType, Platform, } from "react-native"; -import { router, useRouter } from "expo-router"; import { useFonts } from "expo-font"; import { appSignOut } from "../../services/AuthStore"; interface SignOutButtonProps {} export const SignOutButton: React.FC = () => { - const router = useRouter(); const [loading, setLoading] = useState(false); - const [fontsLoaded, fontError] = useFonts({ - "Gilroy-ExtraBold": require("../../../assets/fonts/Gilroy-ExtraBold.otf"), - "Gilroy-Light": require("../../../assets/fonts/Gilroy-Light.otf"), - "Quicksand-Medium": require("../../../assets/fonts/Quicksand-Medium.ttf"), // fixed loading this file! - }); - const handleSignOut = async () => { Alert.alert( "Confirm Sign Out", @@ -43,7 +35,7 @@ export const SignOutButton: React.FC = () => { setLoading(false); if (response?.user === null) { - router.replace("/"); + console.log("Sign out successful"); } else if (response?.error) { console.log(response.error); Alert.alert( @@ -58,9 +50,6 @@ export const SignOutButton: React.FC = () => { ); }; - if (!fontsLoaded && !fontError) { - return null; - } return ( = () => { export const LogInButton: React.FC<{ onPress?: () => void }> = ({ onPress, }) => { - const [fontsLoaded, fontError] = useFonts({ - "Gilroy-ExtraBold": require("../../../assets/fonts/Gilroy-ExtraBold.otf"), - "Gilroy-Light": require("../../../assets/fonts/Gilroy-Light.otf"), - }); - - if (!fontsLoaded && !fontError) { - return null; - } return ( @@ -117,10 +98,10 @@ export const ExternalAuthButton: React.FC<{ imageSource?: ImageSourcePropType; }> = ({ onPress, companyName, imageSource }) => { const images: { [key: string]: ImageSourcePropType } = { - google: require("../../../assets/google_logo.png"), - apple: require("../../../assets/apple_logo.png"), - github: require("../../../assets/github_logo.png"), - facebook: require("../../../assets/facebook_logo.png"), + google: require("../../../assets/icons/auth/google_logo.png"), + apple: require("../../../assets/icons/auth/apple_logo.png"), + github: require("../../../assets/icons/auth/github_logo.png"), + facebook: require("../../../assets/icons/auth/facebook_logo.png"), }; const clicked = () => { @@ -132,7 +113,7 @@ export const ExternalAuthButton: React.FC<{ diff --git a/client/src/components/auth/LogInButton.tsx b/client/src/components/auth/LogInButton.tsx index 860dedf9e..feca28013 100644 --- a/client/src/components/auth/LogInButton.tsx +++ b/client/src/components/auth/LogInButton.tsx @@ -1,21 +1,10 @@ -import { router } from "expo-router"; import React from "react"; -import { useFonts } from "expo-font"; import { StyleSheet, Text, TouchableOpacity, Dimensions } from "react-native"; import { LogInButtonProps } from "../../types/Props"; const LogInButton: React.FC = ({ onPress }) => { - const [fontsLoaded, fontError] = useFonts({ - 'Gilroy-ExtraBold': require('../../../assets/fonts/Gilroy-ExtraBold.otf'), - 'Gilroy-Light': require('../../../assets/fonts/Gilroy-Light.otf'), - }); - - if (!fontsLoaded && !fontError) { - return null; - } - return ( Log In diff --git a/client/src/components/auth/SignUpButton.tsx b/client/src/components/auth/SignUpButton.tsx index 4ae154fc1..34db9cc12 100644 --- a/client/src/components/auth/SignUpButton.tsx +++ b/client/src/components/auth/SignUpButton.tsx @@ -1,18 +1,8 @@ -import { router } from "expo-router"; import React from "react"; -import { useFonts } from "expo-font"; import { StyleSheet, Text, TouchableOpacity, Dimensions } from "react-native"; import { SignUpButtonProps } from "../../types/Props"; const SignUpButton: React.FC = ({ onPress }) => { - const [fontsLoaded, fontError] = useFonts({ - "Gilroy-ExtraBold": require("../../../assets/fonts/Gilroy-ExtraBold.otf"), - "Gilroy-Light": require("../../../assets/fonts/Gilroy-Light.otf"), - }); - - if (!fontsLoaded && !fontError) { - return null; - } return ( diff --git a/client/src/components/chat/ChatMessage.tsx b/client/src/components/chat/ChatMessage.tsx index 72f06f4ef..7527f65d9 100644 --- a/client/src/components/chat/ChatMessage.tsx +++ b/client/src/components/chat/ChatMessage.tsx @@ -19,7 +19,7 @@ const Message: React.FC = ({ messageContent, time, author }) => { diff --git a/client/src/components/chat/MessageChannel.tsx b/client/src/components/chat/MessageChannel.tsx index b6d8b2b64..11a726f24 100644 --- a/client/src/components/chat/MessageChannel.tsx +++ b/client/src/components/chat/MessageChannel.tsx @@ -1,6 +1,6 @@ import React from "react"; import Message from "./ChatMessage"; -import { FlatList, StyleSheet, View } from "react-native"; +import { FlatList } from "react-native"; import { MessageChannelProps } from "../../types/Props"; const MessageChannel: React.FC = ({ messages }) => { diff --git a/client/src/components/chat/NearbyHeader.tsx b/client/src/components/chat/NearbyHeader.tsx index a4d5ad750..971b2eac9 100644 --- a/client/src/components/chat/NearbyHeader.tsx +++ b/client/src/components/chat/NearbyHeader.tsx @@ -1,7 +1,7 @@ - import { View, Text, StyleSheet, Dimensions, Image } from 'react-native' import React from 'react' -import { CounterProps } from '../../utils/types' +import NearbyCount from './NearbyCount'; +import { CounterProps } from '../../types/Props'; export const NearbyHeader: React.FC = ({ count }) => { return ( diff --git a/client/src/components/common/CustomButtons.tsx b/client/src/components/common/CustomButtons.tsx index 6ab96b49c..5caa5f03a 100644 --- a/client/src/components/common/CustomButtons.tsx +++ b/client/src/components/common/CustomButtons.tsx @@ -5,7 +5,7 @@ import { ChatSendButtonProps } from '../../types/Props'; export const ChatSendButton: React.FC = ({ onPress }) => { return ( - + ) } diff --git a/client/src/components/settings/SettingsItem.tsx b/client/src/components/settings/SettingsItem.tsx index c7d6cebdc..42a238ee7 100644 --- a/client/src/components/settings/SettingsItem.tsx +++ b/client/src/components/settings/SettingsItem.tsx @@ -39,7 +39,7 @@ export const SettingsItem = ({id, title, type, setter, data}: SettingsProps) => {(type === 'select') && ( {data[id as keyof typeof data]} - + )} diff --git a/client/src/navigation/AppNavigator.tsx b/client/src/navigation/AppNavigator.tsx index 731c832a3..e93cf0c28 100644 --- a/client/src/navigation/AppNavigator.tsx +++ b/client/src/navigation/AppNavigator.tsx @@ -13,7 +13,10 @@ const AppNavigator = () => { - + diff --git a/client/src/screens/auth/LoginScreen.tsx b/client/src/screens/auth/LoginScreen.tsx index cfb62bfaa..40f0d0248 100644 --- a/client/src/screens/auth/LoginScreen.tsx +++ b/client/src/screens/auth/LoginScreen.tsx @@ -1,12 +1,9 @@ import React, { useEffect } from "react"; -import { useFonts } from "expo-font"; import { View, Text, StyleSheet, Dimensions, - KeyboardAvoidingView, - Platform, TouchableWithoutFeedback, Keyboard, TouchableOpacity, @@ -19,19 +16,15 @@ import { LogInButton, ExternalAuthButton, } from "../../components/auth/AuthButtons"; -import { useLocalSearchParams, useRouter } from "expo-router"; import { appSignIn } from "../../services/AuthStore"; import { AuthenticationErrorMessage, AuthenticationResponse, } from "../../components/auth/AuthenticationResponse"; import { ArrowLeftCircle } from "react-native-feather"; +import { useGlobalFonts } from "../../styles/fonts"; const LoginScreen = ({ route, navigation }: any) => { - const [fontsLoaded, fontError] = useFonts({ - "Quicksand-Bold": require("../../../assets/fonts/Quicksand-Bold.ttf"), - "Quicksand-Medium": require("../../../assets/fonts/Quicksand-Medium.ttf"), - }); const { newEmail } = route.params; @@ -42,9 +35,9 @@ const LoginScreen = ({ route, navigation }: any) => { const [invalidLogin, invalidateLogin] = React.useState(false); // Possbily change this? const externalLoginIcons = { - google: require("../../../assets/google_logo.png"), - facebook: require("../../../assets/facebook_logo.png"), - apple: require("../../../assets/apple_logo.png"), + google: require("../../../assets/icons/auth/google_logo.png"), + facebook: require("../../../assets/icons/auth/facebook_logo.png"), + apple: require("../../../assets/icons/auth/apple_logo.png"), }; // Sign in function with email and password @@ -67,10 +60,6 @@ const LoginScreen = ({ route, navigation }: any) => { setEmail(newEmail); // On load of the page, set the email to the inputEmail if they entered it! }, []); - if (!fontsLoaded && !fontError) { - return null; - } - const handleGoogleSignIn = async () => { console.log("Google Sign In"); }; diff --git a/client/src/screens/auth/SignUpScreen.tsx b/client/src/screens/auth/SignUpScreen.tsx index 8dab4338f..4800d3423 100644 --- a/client/src/screens/auth/SignUpScreen.tsx +++ b/client/src/screens/auth/SignUpScreen.tsx @@ -28,11 +28,6 @@ import { import React from "react"; const SignUpScreen = ({ navigation }: any) => { - const [fontsLoaded, fontError] = useFonts({ - "Quicksand-Bold": require("../../../assets/fonts/Quicksand-Bold.ttf"), - "Quicksand-Medium": require("../../../assets/fonts/Quicksand-Medium.ttf"), - }); - const [email, setEmail] = React.useState(""); const [password, setPassword] = React.useState(""); const [confirmPassword, setConfirmPassword] = React.useState(""); @@ -65,12 +60,6 @@ const SignUpScreen = ({ navigation }: any) => { } }; - if (!fontsLoaded && !fontError) { - return null; - } - if (!fontsLoaded && !fontError) { - return null; - } const handleGoogleSignUp = async () => { console.log("Google Sign Up"); diff --git a/client/src/screens/auth/WelcomeScreen.tsx b/client/src/screens/auth/WelcomeScreen.tsx index b0e300fdf..98040a93f 100644 --- a/client/src/screens/auth/WelcomeScreen.tsx +++ b/client/src/screens/auth/WelcomeScreen.tsx @@ -23,19 +23,10 @@ const WelcomeScreen = ({ navigation }: any) => { const keyboardVerticalOffest = Platform.OS === "ios" ? 0 : 0; const keyboardBehavior = Platform.OS === "ios" ? "padding" : undefined; - const [fontsLoaded, fontError] = useFonts({ - "Gilroy-ExtraBold": require("../../../assets/fonts/Gilroy-ExtraBold.otf"), - "Gilroy-Light": require("../../../assets/fonts/Gilroy-Light.otf"), - }); - const [email, setEmail] = useState(""); const [authResponse, setAuthResponse] = React.useState(); - if (!fontsLoaded && !fontError) { - return null; - } - const handleLogin = () => { const preparedEmail = email.trim(); if (preparedEmail.length !== 0 && isValidEmail(preparedEmail)) { @@ -64,7 +55,7 @@ const WelcomeScreen = ({ navigation }: any) => { @@ -86,7 +77,7 @@ const WelcomeScreen = ({ navigation }: any) => { > diff --git a/client/src/screens/chat/ChatScreen.tsx b/client/src/screens/chat/ChatScreen.tsx index 7542836af..3bded3250 100644 --- a/client/src/screens/chat/ChatScreen.tsx +++ b/client/src/screens/chat/ChatScreen.tsx @@ -1,24 +1,16 @@ import React, { useEffect } from "react"; import { - Keyboard, KeyboardAvoidingView, - TouchableWithoutFeedback, Platform, View, Text, StyleSheet, Dimensions, - SafeAreaView, - ScrollView, } from "react-native"; -import { ChatInput } from "../../components/common/CustomInputs"; -import { ChatSendButton } from "../../components/common/CustomButtons"; import MessageChannel from "../../components/chat/MessageChannel"; import * as Crypto from "expo-crypto"; -import { generateName } from "../../utils/scripts"; import { SignOutButton } from "../../components/auth/AuthButtons"; import { Message } from "../../types/Message"; -import { LocationProvider } from "../../contexts/LocationContext"; import { useSocket } from "../../contexts/SocketContext"; import { useSettings } from "../../contexts/SettingsContext"; import { useLocation } from "../../contexts/LocationContext"; diff --git a/client/src/screens/settings/SettingsScreen.tsx b/client/src/screens/settings/SettingsScreen.tsx index 30da05bed..f3fae4cd3 100644 --- a/client/src/screens/settings/SettingsScreen.tsx +++ b/client/src/screens/settings/SettingsScreen.tsx @@ -4,11 +4,6 @@ import {SafeAreaView, StyleSheet, View, ScrollView, - FlatList, - Switch, - TouchableOpacity, - Image, - Dimensions, } from 'react-native'; import { SettingsItem } from '../../components/settings/SettingsItem'; diff --git a/client/src/styles/fonts.ts b/client/src/styles/fonts.ts new file mode 100644 index 000000000..dc4d044ab --- /dev/null +++ b/client/src/styles/fonts.ts @@ -0,0 +1,14 @@ +import { useFonts } from "expo-font"; + +// Add new fonts in here! +const fonts = { + "Gilroy-ExtraBold": require("../../assets/fonts/Gilroy-ExtraBold.otf"), + "Gilroy-Light": require("../../assets/fonts/Gilroy-Light.otf"), + "Quicksand-Medium": require("../../assets/fonts/Quicksand-Medium.ttf"), + "Quicksand-Bold": require("../../assets/fonts/Quicksand-Bold.ttf"), +} + +export const useGlobalFonts = () => { + const [fontsLoaded, fontError] = useFonts(fonts); + return { fontsLoaded, fontError}; +} diff --git a/client/src/types/Props.ts b/client/src/types/Props.ts index 349ef9de7..752cceedb 100644 --- a/client/src/types/Props.ts +++ b/client/src/types/Props.ts @@ -28,7 +28,7 @@ export type MessageProps = { } export type MessageChannelProps = { - messages: MessageType[], + messages: Message[], } /* misc props*/