chore: Update loading screen and background color for improved user experience

This commit is contained in:
2025-12-27 05:43:02 +01:00
parent b5bc291fbd
commit e7ec46ea41
3 changed files with 29 additions and 7 deletions
+1 -1
View File
@@ -34,7 +34,7 @@
"image": "./assets/images/racoon-splash.png",
"imageWidth": 200,
"resizeMode": "contain",
"backgroundColor": "#ffffff"
"backgroundColor": "#1E1E1E"
}
],
"expo-secure-store",
+2 -6
View File
@@ -1,17 +1,13 @@
import React from "react";
import {useAuth} from "@/src/stores/authStore";
import NotAuthenticated from "@/src/components/NotAuthenticated";
import { ActivityIndicator, View } from "react-native";
import LoadingScreen from "@/src/components/LoadingScreen";
const AuthenticatedWrapper: React.FC<{ children: React.ReactNode }> = ({children}) => {
const {isAuthenticated, loading, authenticatedUser, isHydrated} = useAuth();
if (!isHydrated || loading) {
return (
<View className="flex-1 items-center justify-center">
<ActivityIndicator size="large" />
</View>
);
return <LoadingScreen />;
}
if (!isAuthenticated || !authenticatedUser) {
+26
View File
@@ -0,0 +1,26 @@
import React from "react";
import { View, ActivityIndicator } from "react-native";
import { useColorScheme } from "nativewind";
import Logo from "./Logo";
export default function LoadingScreen() {
const { colorScheme } = useColorScheme();
const isDark = colorScheme === 'dark';
return (
<View
className="flex-1 items-center justify-center"
style={{
backgroundColor: isDark ? '#121212' : '#ffffff'
}}
>
<Logo size="large" />
<ActivityIndicator
size="large"
color={isDark ? '#BB86FC' : '#6200EE'}
style={{ marginTop: 20 }}
/>
</View>
);
}