Skip to content

Commit ca1da62

Browse files
authored
redirect landing page to calendar (#544)
1 parent be4cdbb commit ca1da62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/expo/src/app/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Text, View } from "react-native";
33
import { SafeAreaView } from "react-native-safe-area-context";
44
import * as Notifications from "expo-notifications";
55
import { Redirect, Stack } from "expo-router";
6+
import { useAuth } from "@clerk/clerk-expo";
67

78
import registerForPushNotificationsAsync from "~/notifications/registerNotifications";
89

@@ -19,6 +20,7 @@ const Index = () => {
1920
const [, setExpoPushToken] = useState<Notifications.ExpoPushToken | null>(
2021
null,
2122
);
23+
const { isSignedIn } = useAuth();
2224

2325
useEffect(() => {
2426
registerForPushNotificationsAsync()
@@ -33,7 +35,7 @@ const Index = () => {
3335
<View className="h-full w-full p-4">
3436
<Text className="font-poppins400"> Index </Text>
3537
</View>
36-
<Redirect href="/signin" />
38+
<Redirect href={isSignedIn ? "/calendar/" : "/signin"} />
3739
</SafeAreaView>
3840
);
3941
};

0 commit comments

Comments
 (0)