Skip to content

Commit

Permalink
fix: splash screen layout and sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
finnmerlett committed Jan 16, 2025
1 parent d95bdfb commit 6cd018d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
13 changes: 13 additions & 0 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ export default {
'@react-native-google-signin/google-signin',
{ iosUrlScheme: config.IOS_URL_SCHEME },
],
[
'expo-splash-screen',
{
backgroundColor: '#FFFFFF',
image: './src/assets/splash.png',
// TODO: enable if / when we have a dark mode theme for the app
// dark: {
// image: './src/assets/splash-dark.png',
// backgroundColor: '#000000',
// },
imageWidth: 200, // This is the max allowed width apparently
},
],
],
runtimeVersion: {
policy: 'sdkVersion',
Expand Down
1 change: 0 additions & 1 deletion src/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export default function Main() {

useEffect(() => {
if (hasPoppinsLoaded && hasDidactLoaded && hasFiraCodeLoaded && !loading) {
// FIXME: double-check this is still functional
SplashScreen.hide()
}
}, [hasDidactLoaded, hasFiraCodeLoaded, hasPoppinsLoaded, loading])
Expand Down
Binary file added src/assets/splash-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6cd018d

Please sign in to comment.