updating to use clerk auth with new routing to signin page by default
This commit is contained in:
18
app/index.tsx
Normal file
18
app/index.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { SignedIn, SignedOut, useUser } from '@clerk/clerk-expo'
|
||||
import { Redirect } from 'expo-router'
|
||||
import { View } from 'react-native'
|
||||
|
||||
export default function Page() {
|
||||
const { user } = useUser()
|
||||
|
||||
return (
|
||||
<View>
|
||||
<SignedIn>
|
||||
<Redirect href={'/home'} />
|
||||
</SignedIn>
|
||||
<SignedOut>
|
||||
<Redirect href={'/(auth)/sign-in'} />
|
||||
</SignedOut>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user