Skip to content

Commit

Permalink
splash
Browse files Browse the repository at this point in the history
  • Loading branch information
zorua14 committed Jun 28, 2024
1 parent 38acd99 commit 9d6f208
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
8 changes: 5 additions & 3 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { StatusBar } from "expo-status-bar";
import { StyleSheet, Text, View, useColorScheme } from "react-native";
import { useColorScheme } from "react-native";
import AppNavigator from "./AppNavigator";
import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/integration/react";
Expand All @@ -12,7 +11,7 @@ import {
} from "react-native-paper";
import { lightScheme } from "./src/theme/lightScheme";
import { DarkScheme } from "./src/theme/darkScheme";

import * as SplashScreen from "expo-splash-screen";
const LightTheme = {
...MD3LightTheme,
colors: lightScheme,
Expand All @@ -21,6 +20,9 @@ const DarkTheme = {
...MD3DarkTheme,
colors: DarkScheme,
};

SplashScreen.preventAutoHideAsync();
setTimeout(SplashScreen.hideAsync, 3000);
export default function App() {
const colorscheme = useColorScheme();
const theme = colorscheme === "dark" ? DarkTheme : LightTheme;
Expand Down
5 changes: 3 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"expo": {
"name": "Habit Streak",
"slug": "Habit Streak",
"slug": "habit",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
Expand All @@ -20,7 +20,8 @@
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"package": "com.delewhoop.habit"
},
"web": {
"favicon": "./assets/favicon.png"
Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"react-native-screens": "3.31.1",
"react-native-svg": "^15.3.0",
"react-redux": "^9.1.2",
"redux-persist": "^6.0.0"
"redux-persist": "^6.0.0",
"expo-splash-screen": "~0.27.5"
},
"devDependencies": {
"@babel/core": "^7.20.0"
Expand Down

0 comments on commit 9d6f208

Please sign in to comment.