Files
gh-christianlouis-docuelevate/mobile/app/index.tsx
T
copilot-swe-agent[bot] 1350aa6a5e fix(mobile): add root index.tsx redirect to prevent stale Hello World screen
Without a root app/index.tsx in the repo, a stale default Expo Router
scaffold file (showing "Hello World") could be picked up from a previous
build or CLI scaffolding and displayed instead of the real app.

The new index.tsx immediately redirects to /(auth)/, and the existing
AuthGuard in _layout.tsx forwards authenticated users to /(tabs)/.

Also registers the index screen in the root Stack and updates
docs/MobileApp.md with an expanded project structure and a new
troubleshooting entry.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 23:01:43 +00:00

18 lines
584 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Root index route redirects to the auth flow on launch.
*
* expo-router renders this when the "/" route is matched (i.e. on cold start).
* Without this file, a stale default scaffold page ("Hello World") can appear
* if one was left behind by a previous build or Expo CLI scaffolding.
*
* The redirect targets the (auth) group; the AuthGuard in _layout.tsx will
* immediately forward authenticated users to (tabs).
*/
import { Redirect } from "expo-router";
import React from "react";
export default function RootIndex() {
return <Redirect href="/(auth)/" />;
}