updating to use clerk auth with new routing to signin page by default
This commit is contained in:
12
app/(auth)/_layout.tsx
Normal file
12
app/(auth)/_layout.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useAuth } from '@clerk/clerk-expo'
|
||||
import { Redirect, Stack } from 'expo-router'
|
||||
|
||||
export default function AuthRoutesLayout() {
|
||||
const { isSignedIn } = useAuth()
|
||||
|
||||
if (isSignedIn) {
|
||||
return <Redirect href={'/'} />
|
||||
}
|
||||
|
||||
return <Stack screenOptions={{ headerShown: false }} />
|
||||
}
|
||||
Reference in New Issue
Block a user