-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Quốc Khánh
authored and
Quốc Khánh
committed
Jun 9, 2024
1 parent
3a30232
commit 80271cc
Showing
39 changed files
with
489 additions
and
475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
import { Text } from 'react-native'; | ||
import { Text } from 'react-native' | ||
|
||
export default function HomeScreen() { | ||
return ( | ||
<Text className="font-sans">Home Screen</Text> | ||
); | ||
return <Text className="font-sans">Home Screen</Text> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { Redirect, Stack } from 'expo-router'; | ||
import { useAuth } from '@clerk/clerk-expo'; | ||
import { Text } from 'react-native'; | ||
import { useAuth } from '@clerk/clerk-expo' | ||
import { Redirect, Stack } from 'expo-router' | ||
import { Text } from 'react-native' | ||
|
||
export default function AuthenticatedLayout() { | ||
const { isLoaded, isSignedIn } = useAuth(); | ||
const { isLoaded, isSignedIn } = useAuth() | ||
|
||
if (!isLoaded) { | ||
return <Text>Loading...</Text>; | ||
return <Text>Loading...</Text> | ||
} | ||
|
||
if (!isSignedIn) { | ||
return <Redirect href={"/login"} />; | ||
return <Redirect href={'/login'} /> | ||
} | ||
|
||
return <Stack />; | ||
}; | ||
return <Stack /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
import { Redirect, Stack } from 'expo-router'; | ||
import { useAuth } from '@clerk/clerk-expo'; | ||
import { SafeAreaView } from 'react-native'; | ||
import { useAuth } from '@clerk/clerk-expo' | ||
import { Redirect, Stack } from 'expo-router' | ||
import { SafeAreaView } from 'react-native' | ||
|
||
export default function UnAuthenticatedLayout() { | ||
const { isSignedIn, userId } = useAuth(); | ||
|
||
console.log("UnAuthenticatedLayout", isSignedIn, userId) | ||
const { isSignedIn } = useAuth() | ||
|
||
if (isSignedIn) { | ||
return <Redirect href={"/"} />; | ||
return <Redirect href={'/'} /> | ||
} | ||
|
||
return ( | ||
<SafeAreaView className="flex-1"> | ||
<Stack screenOptions={{ headerShown: false }} /> | ||
</SafeAreaView> | ||
); | ||
}; | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json", | ||
"extends": ["../../biome.json"], | ||
"files": { | ||
"include": ["**/*.ts", "**/*.tsx"], | ||
"ignore": ["**/*.d.ts"] | ||
} | ||
} |
Oops, something went wrong.