feat: better theming, UI fixes, bug fixes

This commit is contained in:
2026-05-13 18:20:57 -04:00
Verified
parent 0d6ab45abc
commit 1b2a45cae2
16 changed files with 1448 additions and 795 deletions
+5 -13
View File
@@ -1,21 +1,13 @@
import { useRouter } from "expo-router";
import { Redirect } from "expo-router";
import { StatusBar } from "expo-status-bar";
import React, { useEffect } from "react";
import { useAuth } from "../src/context/AuthContext";
export default function IndexRedirect() {
const router = useRouter();
const { isAuthenticated, isLoading } = useAuth();
useEffect(() => {
if (!isLoading) {
if (isAuthenticated) {
router.replace("/(tabs)");
} else {
router.replace("/login");
}
}
}, [isAuthenticated, isLoading, router]);
if (isLoading) {
return <StatusBar style="auto" />;
}
return <StatusBar style="auto" />;
return <Redirect href={isAuthenticated ? "/devices" : "/login"} />;
}