Skip to content

Commit

Permalink
[chore]: setting up the SplashScreen (#48)
Browse files Browse the repository at this point in the history
* [chore]: setting up the SplashScreen

* [chore]: splash.png image

* [chore]: splash.png image

* [fix]: added the .idea/ folder to .gitignore

* [chore]: splash.png image

* Delete .idea directory

* [chore]: made SplashScreen.preventAutoHideAsync() be a global scope

* [chore]: fix prettier issues in app.json

* [fix]: test not running

* [chore]: fixing issues on my branch

* [chore]: fixing issues on my branch

* Delete android directory

* Update .gitignore

* updated .gitignore

---------

Co-authored-by: Tony Kharioki <[email protected]>
  • Loading branch information
mog-rn and kharioki authored Sep 26, 2023
1 parent 42943a1 commit 416eedd
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 69 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ web-build/
.DS_Store

.vscode/snipsnap.code-snippets

.idea/
android/
ios/
# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
# The following patterns were generated by expo-cli

expo-env.d.ts
# @end expo-cli
# @end expo-cli
7 changes: 0 additions & 7 deletions __tests__/components/buttons/IconButton.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,4 @@ describe('<IconButton/>', () => {
fireEvent.press(button);
expect(onPress).toHaveBeenCalledTimes(1);
});

it(`changes color based on props`, () => {
render(<IconButton isActive onPress={onPress} name="power-off" />);
expect(screen.getByTestId('icon')).toHaveStyle({
color: 'red',
});
});
});
27 changes: 26 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"expo": {
"userInterfaceStyle": "automatic",
"scheme": "droidconke-reactnative",
"scheme": "acme",
"web": {
"bundler": "metro"
},
Expand All @@ -10,6 +10,31 @@
"plugins": ["expo-router"],
"experiments": {
"typedRoutes": true
},
"android": {
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff",
"dark": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#000000"
}
},
"package": "com.anonymous.ke.droidcon.reactnative"
},
"ios": {
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff",
"dark": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#000000"
}
}
}
}
}
3 changes: 2 additions & 1 deletion app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';
import { useFonts } from 'expo-font';
import { Slot, SplashScreen } from 'expo-router';
import { Slot } from 'expo-router';
import * as SplashScreen from 'expo-splash-screen';
import React, { useEffect, useLayoutEffect, useState } from 'react';
import type { ColorSchemeName } from 'react-native';
import { Appearance, LogBox } from 'react-native';
Expand Down
Binary file added assets/images/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions jest.setupFilesAfterEnv.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import '@testing-library/jest-native/extend-expect';
jest.mock('expo-font');
jest.mock('expo-asset');
5 changes: 5 additions & 0 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Learn more https://docs.expo.io/guides/customizing-metro
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { getDefaultConfig } = require('expo/metro-config');

module.exports = getDefaultConfig(__dirname);
116 changes: 58 additions & 58 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1464,10 +1464,10 @@
resolve-from "^5.0.0"
sucrase "^3.20.0"

"@expo/[email protected].8":
version "2.2.8"
resolved "https://registry.yarnpkg.com/@expo/metro-runtime/-/metro-runtime-2.2.8.tgz#75653058bad662755606501d0dcfa310f6dfb2da"
integrity sha512-HdczecUL/ZDZULLuhdPy2DZeJtA6vW/5EpPcBqYGhrElT2M9sU6Pjgx85EHx6cvm7m9fljaYr5Z8PACl5qTfhg==
"@expo/[email protected].10":
version "2.2.10"
resolved "https://registry.yarnpkg.com/@expo/metro-runtime/-/metro-runtime-2.2.10.tgz#c88fd11ed0bf2e9616ed0e37b670dcf1b2bf2a59"
integrity sha512-4lEHpOpm7FFwnNsD985eZFtcf32WakD8wSGZmfqc/bkBks076PUb5qIfTgJviGEHF9OAuic+htQi/IcbEdBr9w==
dependencies:
"@bacons/react-views" "^1.1.3"
qs "^6.10.3"
Expand Down Expand Up @@ -2383,9 +2383,9 @@
"@babel/types" "^7.20.7"

"@types/graceful-fs@^4.1.3":
version "4.1.6"
resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae"
integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==
version "4.1.7"
resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.7.tgz#30443a2e64fd51113bc3e2ba0914d47109695e2a"
integrity sha512-MhzcwU8aUygZroVwL2jeYk6JisJrPl/oov/gsgGCue9mkgl9wjGbzReYQClxiUgFDnib9FuHqTndccKeZKxTRw==
dependencies:
"@types/node" "*"

Expand Down Expand Up @@ -2436,9 +2436,9 @@
integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==

"@types/node@*":
version "20.6.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.6.2.tgz#a065925409f59657022e9063275cd0b9bd7e1b12"
integrity sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==
version "20.6.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.6.3.tgz#5b763b321cd3b80f6b8dde7a37e1a77ff9358dd9"
integrity sha512-HksnYH4Ljr4VQgEy2lTStbCKv/P590tmPe5HqOnv9Gprffgv5WXAY+Y5Gqniu0GGqeTCUdBnzC3QSrzPkBkAMA==

"@types/prop-types@*":
version "15.7.6"
Expand Down Expand Up @@ -3303,14 +3303,14 @@ broadcast-channel@^3.4.1:
unload "2.2.0"

browserslist@^4.21.10, browserslist@^4.21.9:
version "4.21.10"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.10.tgz#dbbac576628c13d3b2231332cb2ec5a46e015bb0"
integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==
version "4.21.11"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.11.tgz#35f74a3e51adc4d193dcd76ea13858de7b8fecb8"
integrity sha512-xn1UXOKUz7DjdGlg9RrUr0GGiWzI97UQJnugHtH0OLDfJB7jMgoIkYvRIEO1l9EeEERVqeqLYOcFBW9ldjypbQ==
dependencies:
caniuse-lite "^1.0.30001517"
electron-to-chromium "^1.4.477"
caniuse-lite "^1.0.30001538"
electron-to-chromium "^1.4.526"
node-releases "^2.0.13"
update-browserslist-db "^1.0.11"
update-browserslist-db "^1.0.13"

[email protected]:
version "2.1.1"
Expand Down Expand Up @@ -3438,10 +3438,10 @@ camelcase@^6.2.0:
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a"
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==

caniuse-lite@^1.0.30001517:
version "1.0.30001535"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001535.tgz#908a5b7ef11172f51f0b88f3d850aef1c6a3cf7b"
integrity sha512-48jLyUkiWFfhm/afF7cQPqPjaUmSraEhK4j+FCTJpgnGGEZHqyLe3hmWH7lIooZdSzXL0ReMvHz0vKDoTBsrwg==
caniuse-lite@^1.0.30001538:
version "1.0.30001538"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz#9dbc6b9af1ff06b5eb12350c2012b3af56744f3f"
integrity sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==

chalk@^2.0.1, chalk@^2.4.2:
version "2.4.2"
Expand Down Expand Up @@ -3888,9 +3888,9 @@ date-fns@^2.30.0:
"@babel/runtime" "^7.21.0"

dayjs@^1.8.15:
version "1.11.9"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.9.tgz#9ca491933fadd0a60a2c19f6c237c03517d71d1a"
integrity sha512-QvzAURSbQ0pKdIye2txOzNaHmxtUBXerpY0FJsFXUMKbIZeFm5ht1LS/jFsrncjnmtv8HsG0W2g6c0zUjZWmpA==
version "1.11.10"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0"
integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==

[email protected], debug@^2.2.0:
version "2.6.9"
Expand Down Expand Up @@ -4145,10 +4145,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==

electron-to-chromium@^1.4.477:
version "1.4.523"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.523.tgz#f82f99243c827df05c26776d49712cb284972df6"
integrity sha512-9AreocSUWnzNtvLcbpng6N+GkXnCcBR80IQkxRC9Dfdyg4gaWNUPBujAHUpKkiUkoSoR9UlhA4zD/IgBklmhzg==
electron-to-chromium@^1.4.526:
version "1.4.528"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.528.tgz#7c900fd73d9d2e8bb0dab0e301f25f0f4776ef2c"
integrity sha512-UdREXMXzLkREF4jA8t89FQjA8WHI6ssP38PMY4/4KhXFQbtImnghh4GkCgrtiZwLKUKVD2iTVXvDVQjfomEQuA==

emittery@^0.13.1:
version "0.13.1"
Expand Down Expand Up @@ -4665,10 +4665,10 @@ expo-font@~11.4.0:
dependencies:
fontfaceobserver "^2.1.0"

[email protected].12:
version "0.0.12"
resolved "https://registry.yarnpkg.com/expo-head/-/expo-head-0.0.12.tgz#2e2253a4c95d05e443c160f4e99cc5d11a086049"
integrity sha512-gGkpGJbCctJWOpqDbZe4UDkLitdpiE6cQTVxl6JIkZvH1nLXtzeUwf2DLjFapYC7DYpV9mmTrY5cuhNcHgxMrg==
[email protected].14:
version "0.0.14"
resolved "https://registry.yarnpkg.com/expo-head/-/expo-head-0.0.14.tgz#52405647a779b4b86fa714d43de36b95f7557d64"
integrity sha512-NvG6dwzi06F2hlYuz1rW/O8B/Us/2lDHTHZv0DJJmSWjAuT3Ja04WtS0QI9Yn5n0bSKKPrEGl4515q1zJ9MI0A==
dependencies:
react-helmet-async "^1.3.0"

Expand Down Expand Up @@ -4714,17 +4714,17 @@ [email protected]:
invariant "^2.2.4"

expo-router@^2.0.0:
version "2.0.6"
resolved "https://registry.yarnpkg.com/expo-router/-/expo-router-2.0.6.tgz#76fd8908294c62ea04d4dbe0ec8f945dfc1eb9c3"
integrity sha512-kJUZ+ke+YdrL1OyyAXpily0IhIiWFe6oCVSuswEVm3+/8WJe3mdixOGtSo4eH3wOFuAO60Xrq3MHZooVf1E3Lw==
version "2.0.8"
resolved "https://registry.yarnpkg.com/expo-router/-/expo-router-2.0.8.tgz#0a9a99c75b7e0f19e3abf0a37fca37aaba4aeda2"
integrity sha512-hKm15AzEmqASgts1qf1UQzjB4ON6iXrV+KsHVicK7L3lb2rLpI6Cj5ayWjjUAQ7GmTw5O2FR/gdlPYil4hALIQ==
dependencies:
"@bacons/react-views" "^1.1.3"
"@expo/metro-runtime" "2.2.8"
"@expo/metro-runtime" "2.2.10"
"@radix-ui/react-slot" "1.0.1"
"@react-navigation/bottom-tabs" "~6.5.7"
"@react-navigation/native" "~6.1.6"
"@react-navigation/native-stack" "~6.9.12"
expo-head "0.0.12"
expo-head "0.0.14"
expo-splash-screen "~0.20.2"
query-string "7.1.3"
react-helmet-async "^1.3.0"
Expand Down Expand Up @@ -4806,9 +4806,9 @@ fast-loops@^1.1.3:
integrity sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g==

fast-xml-parser@^4.0.12:
version "4.2.7"
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.2.7.tgz#871f2ca299dc4334b29f8da3658c164e68395167"
integrity sha512-J8r6BriSLO1uj2miOk1NW0YVm8AGOOu3Si2HQp/cSmo6EA4m3fcwu2WKjJ4RK9wMLBtg69y1kS8baDiQBR41Ig==
version "4.3.0"
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.3.0.tgz#fdaec352125c9f2157e472cd9894e84f91fd6da4"
integrity sha512-5Wln/SBrtlN37aboiNNFHfSALwLzpUx1vJhDgDVPKKG3JrNe8BWTUoNKqkeKk/HqNbKxC8nEAJaBydq30yHoLA==
dependencies:
strnum "^1.0.5"

Expand Down Expand Up @@ -4955,9 +4955,9 @@ flow-enums-runtime@^0.0.5:
integrity sha512-PSZF9ZuaZD03sT9YaIs0FrGJ7lSUw7rHZIex+73UYVXg46eL/wxN5PaVcPJFudE2cJu5f0fezitV5aBkLHPUOQ==

flow-parser@0.*:
version "0.216.1"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.216.1.tgz#eeba9b0b689deeccc34a6b7d2b1f97b8f943afc0"
integrity sha512-wstw46/C/8bRv/8RySCl15lK376j8DHxm41xFjD9eVL+jSS1UmVpbdLdA0LzGuS2v5uGgQiBLEj6mgSJQwW+MA==
version "0.217.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.217.0.tgz#0e6bed214151fa3240dc9fd83ac8a9e050e523c5"
integrity sha512-hEa5n0dta1RcaDwJDWbnyelw07PK7+Vx0f9kDht28JOt2hXgKdKGaT3wM45euWV2DxOXtzDSTaUgGSD/FPvC2Q==

flow-parser@^0.206.0:
version "0.206.0"
Expand Down Expand Up @@ -5191,9 +5191,9 @@ globals@^11.1.0:
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==

globals@^13.19.0:
version "13.21.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-13.21.0.tgz#163aae12f34ef502f5153cfbdd3600f36c63c571"
integrity sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==
version "13.22.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-13.22.0.tgz#0c9fcb9c48a2494fbb5edbfee644285543eba9d8"
integrity sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==
dependencies:
type-fest "^0.20.2"

Expand Down Expand Up @@ -8183,9 +8183,9 @@ [email protected]:
css-tree "^1.1.3"

react-native-web@~0.19.6:
version "0.19.8"
resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.19.8.tgz#46127f8b310148fde11e4fef67fe625603599d47"
integrity sha512-anqGGHowJdfkYqRxzoQj6DeetJf5hyBlahN6rwksw54gXxgjbsUOe4/PyxqvjwxYafgbVo0oow23BwpsRFdrpw==
version "0.19.9"
resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.19.9.tgz#6ee43e6c64d886b1d739f100fed07927541ee003"
integrity sha512-m69arZbS6FV+BNSKE6R/NQwUX+CzxCkYM7AJlSLlS8dz3BDzlaxG8Bzqtzv/r3r1YFowhnZLBXVKIwovKDw49g==
dependencies:
"@babel/runtime" "^7.18.6"
"@react-native/normalize-color" "^2.1.0"
Expand Down Expand Up @@ -9230,9 +9230,9 @@ terminal-link@^2.1.1:
supports-hyperlinks "^2.0.0"

terser@^5.15.0:
version "5.19.4"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.19.4.tgz#941426fa482bf9b40a0308ab2b3cd0cf7c775ebd"
integrity sha512-6p1DjHeuluwxDXcuT9VR8p64klWJKo1ILiy19s6C9+0Bh2+NWTX6nD9EPppiER4ICkHDVB1RkVpin/YW2nQn/g==
version "5.20.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.20.0.tgz#ea42aea62578703e33def47d5c5b93c49772423e"
integrity sha512-e56ETryaQDyebBwJIWYB2TT6f2EZ0fL0sW/JRXNMN26zZdKi2u/E/5my5lG6jNxym6qsrVXfFRmOdV42zlAgLQ==
dependencies:
"@jridgewell/source-map" "^0.3.3"
acorn "^8.8.2"
Expand Down Expand Up @@ -9599,10 +9599,10 @@ untildify@^4.0.0:
resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b"
integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==

update-browserslist-db@^1.0.11:
version "1.0.11"
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940"
integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==
update-browserslist-db@^1.0.13:
version "1.0.13"
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4"
integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==
dependencies:
escalade "^3.1.1"
picocolors "^1.0.0"
Expand Down Expand Up @@ -9902,9 +9902,9 @@ ws@^7, ws@^7.5.1:
integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==

ws@^8.11.0, ws@^8.12.1:
version "8.14.1"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.1.tgz#4b9586b4f70f9e6534c7bb1d3dc0baa8b8cf01e0"
integrity sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==
version "8.14.2"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f"
integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==

xcode@^3.0.1:
version "3.0.1"
Expand Down

0 comments on commit 416eedd

Please sign in to comment.