diff --git a/app/index.tsx b/app/index.tsx new file mode 100644 index 0000000..850883c --- /dev/null +++ b/app/index.tsx @@ -0,0 +1,5 @@ +import { Redirect } from 'expo-router'; + +export default function Index() { + return ; +} \ No newline at end of file diff --git a/app/login.tsx b/app/login.tsx index efc0ce7..47fdcd7 100644 --- a/app/login.tsx +++ b/app/login.tsx @@ -1,12 +1,25 @@ import { TextInput, View, StyleSheet, Button } from 'react-native' import { useState } from 'react' +import axios from 'axios' export default function LoginView() { - const [email, setEmail] = useState('') + const [username, setUsername] = useState('') const [password, setPassword] = useState('') - function login() { - console.log(email, password) + async function login() { + console.log(username, password) + try { + const res = await axios.get("https://api.feedbin.com/v2/authentication.json", { + auth: { + username, + password + } + }) + console.log(res.status) + } catch(e) { + console.log("error on verifing your credentials") + console.log(e) + } } const styles = StyleSheet.create({ @@ -22,7 +35,7 @@ export default function LoginView() { } }) return - +