diff --git a/app/(auth)/_layout.tsx b/app/(auth)/_layout.tsx index 25af909..4924b79 100644 --- a/app/(auth)/_layout.tsx +++ b/app/(auth)/_layout.tsx @@ -17,6 +17,7 @@ import { toDosPageIndex, userSettingsView, } from "@/components/pages/calendar/atoms"; +import FeedbackNavIcon from "@/assets/svgs/FeedbackNavIcon"; export default function TabLayout() { const {mutateAsync: signOut} = useSignOut(); @@ -39,8 +40,8 @@ export default function TabLayout() { }} drawerContent={(props) => { return ( - - + + } + icon={}/> + { + props.navigation.navigate("feedback"); + setPageIndex(0); + setToDosIndex(0); + setUserView(true); + setIsFamilyView(false); + }} + icon={} /> @@ -162,6 +175,7 @@ export default function TabLayout() { + + + + ); +}; + +const styles = StyleSheet.create({ + searchField: { + borderWidth: 0.7, + borderColor: "#9b9b9b", + borderRadius: 15, + height: 42, + paddingLeft: 10, + marginVertical: 20, + }, +}); + +export default FeedbackPage; diff --git a/components/pages/main/SignInPage.tsx b/components/pages/main/SignInPage.tsx index b3b0718..8f926b2 100644 --- a/components/pages/main/SignInPage.tsx +++ b/components/pages/main/SignInPage.tsx @@ -1,183 +1,193 @@ import { - Button, - ButtonSize, - Colors, - KeyboardAwareScrollView, - LoaderScreen, - Text, - TextField, - TextFieldRef, - View, + Button, + ButtonSize, + Colors, + KeyboardAwareScrollView, + LoaderScreen, + Text, + TextField, + TextFieldRef, + View, } from "react-native-ui-lib"; -import React, {useRef, useState} from "react"; -import {useSignIn} from "@/hooks/firebase/useSignIn"; -import {KeyboardAvoidingView, Platform, StyleSheet} from "react-native"; +import React, { useRef, useState } from "react"; +import { useSignIn } from "@/hooks/firebase/useSignIn"; +import { KeyboardAvoidingView, Platform, StyleSheet } from "react-native"; import Toast from "react-native-toast-message"; import KeyboardManager from "react-native-keyboard-manager"; -import {SafeAreaView} from "react-native-safe-area-context"; -import {useRouter} from "expo-router"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { useRouter } from "expo-router"; -KeyboardManager.setEnableAutoToolbar(true); +if (Platform.OS === "ios") KeyboardManager.setEnableAutoToolbar(true); const SignInPage = () => { - const [email, setEmail] = useState(""); - const [password, setPassword] = useState(""); - const passwordRef = useRef(null); + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + const passwordRef = useRef(null); - const {mutateAsync: signIn, error, isError, isLoading} = useSignIn(); + const { mutateAsync: signIn, error, isError, isLoading } = useSignIn(); - const router = useRouter() + const router = useRouter(); - const handleSignIn = async () => { - await signIn({email, password}); - if (!isError) { - Toast.show({ - type: "success", - text1: "Login successful!", - }); - } else { - Toast.show({ - type: "error", - text1: "Error logging in", - text2: `${error}`, - }); - } - }; + const handleSignIn = async () => { + await signIn({ email, password }); + if (!isError) { + Toast.show({ + type: "success", + text1: "Login successful!", + }); + } else { + Toast.show({ + type: "error", + text1: "Error logging in", + text2: `${error}`, + }); + } + }; - return ( - - - - - - Jump back into Cally - - - Please enter your details. - - + return ( + + + + + + Jump back into Cally + + + Please enter your details. + + - - { - // Move focus to the description field - passwordRef.current?.focus(); - }} - /> - - + + { + // Move focus to the description field + passwordRef.current?.focus(); + }} + /> + + - + -