20 lines
467 B
TypeScript
20 lines
467 B
TypeScript
import { Redirect } from "expo-router"
|
|
|
|
import { LoadingView } from "@/components/ui/primitives"
|
|
import { useServerConfig } from "@/contexts/server-config"
|
|
import { AuthenticatedRedirect } from "@/components/authenticated-redirect"
|
|
|
|
export default function Index() {
|
|
const { config, isLoading } = useServerConfig()
|
|
|
|
if (isLoading) {
|
|
return <LoadingView />
|
|
}
|
|
|
|
if (!config) {
|
|
return <Redirect href="/server" />
|
|
}
|
|
|
|
return <AuthenticatedRedirect />
|
|
}
|