updating to use clerk auth with new routing to signin page by default

This commit is contained in:
Will Baumbach
2025-08-05 15:34:07 -05:00
parent 409f15f233
commit 10815a9a81
17 changed files with 1670 additions and 247 deletions

View File

@@ -1,12 +1,9 @@
import { router } from 'expo-router'
import React from 'react'
import { StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native'
import { useSession } from './ctx'
export default function LoginScreen() {
const [username, setUsername] = React.useState('')
const [password, setPassword] = React.useState('')
const { login } = useSession()
return (
<View style={styles.container}>
@@ -30,22 +27,19 @@ export default function LoginScreen() {
<TouchableOpacity
style={styles.button}
onPress={() => {
login()
if (localStorage.getItem('session') === 'success') {
router.replace('/')
}
console.log('test')
}}
>
<Text style={{ color: '#fff', fontWeight: 'bold' }}>Login</Text>
</TouchableOpacity>
<TouchableOpacity
{/* <TouchableOpacity
style={styles.signup}
onPress={() => {
router.navigate('/signup')
}}
>
<Text style={{ color: '#fff' }}>Sign Up</Text>
</TouchableOpacity>
</TouchableOpacity> */}
</View>
</View>
)