From caf614d78cf253ad21f504471edefa6dea8ded1b Mon Sep 17 00:00:00 2001 From: Will Wedmedyk Date: Thu, 4 Apr 2024 11:02:33 -0400 Subject: [PATCH 1/3] ww/auth: adding login ui boilerplate --- app/sign-in.tsx | 130 ++++++++++++++++++++++++++++++++++++++----- svgs/curious_fox.svg | 1 + 2 files changed, 118 insertions(+), 13 deletions(-) create mode 100644 svgs/curious_fox.svg diff --git a/app/sign-in.tsx b/app/sign-in.tsx index 6918d28..301834c 100644 --- a/app/sign-in.tsx +++ b/app/sign-in.tsx @@ -1,22 +1,126 @@ -import { router } from "expo-router"; +import { HrefObject, Link, router } from "expo-router"; // import { Text, View } from "react-native"; import { useSession } from "../context/Auth/ctx"; -import { Text, View } from "../components/Themed"; +import { Text, TextInput, View } from "../components/Themed"; +import GithubLoginComponent from "../components/GithubLogin"; +import { StyleSheet, useColorScheme } from "react-native"; +import { useState } from "react"; +import Colors from "../constants/Colors"; +import { Button } from "../components/Button"; + +// import SeekingFox from "../svgs/seeking_fox.svg"; +import CuriousFox from "../svgs/curious_fox_min.svg"; + +type Url = { + pathname: string; + params?: { id: string }; +}; export default function SignIn() { + const [userName, setUserName] = useState(""); + const [password, setPassword] = useState(""); + const colorScheme = useColorScheme(); const { signIn } = useSession(); + + const handleRegister = () => { + router.replace("/register"); + }; + + const handleSignIn = () => { + // api stuff here + // userName, password + //on res: + signIn(); + // Navigate after signing in. You may want to tweak this to ensure sign-in is + // successful before navigating. + router.replace("/"); + }; return ( - - { - signIn(); - // Navigate after signing in. You may want to tweak this to ensure sign-in is - // successful before navigating. - router.replace("/"); - }} - > - Sign In - + + + + + Welcome to Freedu! + Please login to continue + + + + +