frontend client for gemstone. decentralised workplace app
1import { Login } from "@/components/Auth/Login";
2import { Loading } from "@/components/primitives/Loading";
3import { useOAuthValue } from "@/providers/OAuthProvider";
4import { Redirect } from "expo-router";
5import { View } from "react-native";
6
7const LoginPage = () => {
8 const { isLoading, session } = useOAuthValue();
9
10 if (isLoading) {
11 return (
12 <View
13 style={{
14 flex: 1,
15 justifyContent: "center",
16 alignItems: "center",
17 }}
18 >
19 <Loading />
20 </View>
21 );
22 }
23
24 if (session) {
25 return <Redirect href="/" />;
26 }
27
28 return (
29 <View
30 style={{
31 flex: 1,
32 justifyContent: "center",
33 alignItems: "center",
34 }}
35 >
36 <Login />
37 </View>
38 );
39};
40
41export default LoginPage;