create-100x-mobile 0.4.10 → 0.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,9 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.authLayoutTemplate = authLayoutTemplate;
4
4
  function authLayoutTemplate() {
5
- return `import { Stack } from "expo-router";
5
+ return `import { Redirect, Stack } from "expo-router";
6
+ import { useAuth } from "@clerk/clerk-expo";
6
7
 
7
8
  export default function AuthLayout() {
9
+ const { isLoaded, isSignedIn } = useAuth();
10
+
11
+ if (!isLoaded) {
12
+ return null;
13
+ }
14
+
15
+ if (isSignedIn) {
16
+ return <Redirect href="/" />;
17
+ }
18
+
8
19
  return (
9
20
  <Stack screenOptions={{ headerShown: false }}>
10
21
  <Stack.Screen name="sign-in" />
@@ -14,7 +14,6 @@ import {
14
14
  } from "react-native";
15
15
  import { SafeAreaView } from "react-native-safe-area-context";
16
16
  import { useOAuth } from "@clerk/clerk-expo";
17
- import { useRouter } from "expo-router";
18
17
  import { SquareCheck as CheckSquare } from "lucide-react-native";
19
18
  import Svg, { Path } from "react-native-svg";
20
19
  import * as WebBrowser from "expo-web-browser";
@@ -22,7 +21,6 @@ import * as WebBrowser from "expo-web-browser";
22
21
  WebBrowser.maybeCompleteAuthSession();
23
22
 
24
23
  export default function SignInScreen() {
25
- const router = useRouter();
26
24
  const { startOAuthFlow: startGoogleOAuth } = useOAuth({
27
25
  strategy: "oauth_google",
28
26
  });
@@ -44,7 +42,6 @@ export default function SignInScreen() {
44
42
 
45
43
  if (createdSessionId && setActive) {
46
44
  await setActive({ session: createdSessionId });
47
- router.replace("/");
48
45
  }
49
46
  } catch (err: any) {
50
47
  console.error(\`\${provider} OAuth error:\`, err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-100x-mobile",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "description": "Scaffold a full-stack mobile app with Expo + Convex + Clerk in seconds",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {