From e7fc23213fb5a3fdc8fff68b345aaf4d9fc9150d Mon Sep 17 00:00:00 2001 From: Twanda Mudonhi <161071449+Tawanda21@users.noreply.github.com> Date: Wed, 7 May 2025 17:07:44 +0200 Subject: [PATCH 01/37] Updated LoginScreen and Auth and AppNavigator --- App.js | 6 +- components/Auth.js | 41 +------ navigation/AppNavigator.js | 23 ++-- screens/LoginScreen.js | 225 ++++++++++++++++++++++--------------- 4 files changed, 149 insertions(+), 146 deletions(-) diff --git a/App.js b/App.js index 7e2af9c..f1f9277 100644 --- a/App.js +++ b/App.js @@ -1,15 +1,13 @@ import React from 'react'; import { StatusBar, SafeAreaView } from 'react-native'; import AppNavigator from './navigation/AppNavigator'; -import Auth from './components/Auth'; + export default function App() { return ( <> - - - + ); diff --git a/components/Auth.js b/components/Auth.js index aa5a353..1de3ea5 100644 --- a/components/Auth.js +++ b/components/Auth.js @@ -1,43 +1,10 @@ -import React, { useState } from 'react'; -import { Alert, StyleSheet, View } from 'react-native'; -import { supabase } from '../lib/supabase'; // Adjust the import path as necessary -import { Button, Input } from '@rneui/themed'; - -export default function Auth() { - const [email, setEmail] = useState(''); - const [password, setPassword] = useState(''); - - const signInWithEmail = async () => { - const { error } = await supabase.auth.signInWithPassword({ email, password }); - if (error) Alert.alert(error.message); - }; - - const signUpWithEmail = async () => { - const { error } = await supabase.auth.signUp({ email, password }); - if (error) Alert.alert(error.message); - }; +import React from 'react'; +import { View, StyleSheet } from 'react-native'; +export default function Auth({ navigation }) { return ( - - -