Add splash screen handling and logo to HomeScreen, update dependencies
All checks were successful
Build App / build-android (push) Successful in 7m2s
Build App / build-web (push) Successful in 29s
Build App / release (push) Successful in 11s

This commit is contained in:
Space-Banane
2026-03-10 21:13:25 +01:00
parent 60909913a5
commit 51c54d4892
6 changed files with 226 additions and 3 deletions

11
App.js
View File

@@ -1,6 +1,7 @@
import React, { useEffect, useMemo, useRef, useState } from 'react';
import { BackHandler, Platform, StatusBar } from 'react-native';
import * as ScreenOrientation from 'expo-screen-orientation';
import * as SplashScreen from 'expo-splash-screen';
import FocusScreen from './src/screens/FocusScreen';
import HomeScreen from './src/screens/HomeScreen';
import TimeUntilScreen from './src/screens/TimeUntilScreen';
@@ -8,6 +9,11 @@ import TimerScreen from './src/screens/TimerScreen';
import { createStyles } from './src/styles';
import { getTheme } from './src/theme';
// Keep the splash screen visible while we fetch resources
SplashScreen.preventAutoHideAsync().catch(() => {
/* reloading the app might cause this to error in dev */
});
export default function App() {
const styles = useMemo(() => createStyles(), []);
@@ -33,6 +39,11 @@ export default function App() {
const timerRef = useRef(null);
const theme = getTheme(darkMode, pinkMode);
useEffect(() => {
// Hide splash screen after initialization
SplashScreen.hideAsync().catch(() => {});
}, []);
useEffect(() => {
if (Platform.OS !== 'web') {
ScreenOrientation.unlockAsync();