Skip to content

Commit

Permalink
#83 feat: add splash (#87)
Browse files Browse the repository at this point in the history
* #83 feat: add splash screen

* #83 feat: set splash screen with lottieView
  • Loading branch information
eujin-shin authored Jul 5, 2024
1 parent 04529c7 commit e8becaf
Show file tree
Hide file tree
Showing 7 changed files with 3,080 additions and 2,401 deletions.
30 changes: 21 additions & 9 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useState } from 'react';
import { View, TouchableOpacity, Text } from 'react-native';
import {
NavigationContainer,
Expand All @@ -22,6 +22,7 @@ import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { BottomBarProvider, useBottomBar } from './contexts/BottomBarContext';
import { LoginProvider } from './src/common/Context';
import Reformer from './src/components/Auth/Reformer/Reformer';
import SplashScreen from './src/common/SplashScreen';

export type StackProps = {
Home: undefined;
Expand All @@ -40,19 +41,30 @@ const GlobalTheme = {
};

function App(): React.JSX.Element {
const [isSplashFinished, setIsSplashFinished] = useState(false);

const finishSplash = () => {
console.log('finished');
setIsSplashFinished(true);
};

return (
<BottomBarProvider>
<GestureHandlerRootView style={{ flex: 1 }}>
<LoginProvider>
<NavigationContainer theme={GlobalTheme}>
<Stack.Navigator
screenOptions={() => ({
headerShown: false,
})}>
<Stack.Screen name="Home" component={HomeTab} />
<Stack.Screen name="Signin" component={SignIn} />
<Stack.Screen name="ReformProfile" component={Reformer} />
</Stack.Navigator>
{!isSplashFinished ? (
<SplashScreen onFinish={finishSplash} />
) : (
<Stack.Navigator
screenOptions={() => ({
headerShown: false,
})}>
<Stack.Screen name="Home" component={HomeTab} />
<Stack.Screen name="Signin" component={SignIn} />
<Stack.Screen name="ReformProfile" component={Reformer} />
</Stack.Navigator>
)}
</NavigationContainer>
</LoginProvider>
</GestureHandlerRootView>
Expand Down
73 changes: 46 additions & 27 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ PODS:
- hermes-engine/Pre-built (= 0.73.2)
- hermes-engine/Pre-built (0.73.2)
- libevent (2.1.12)
- lottie-ios (3.4.0)
- lottie-react-native (5.1.5):
- lottie-ios (~> 3.4.0)
- React-Core
- OpenSSL-Universal (1.1.1100)
- RCT-Folly (2022.05.16.00):
- boost
Expand Down Expand Up @@ -944,25 +948,27 @@ PODS:
- React-Mapbuffer (0.73.2):
- glog
- React-debug
- react-native-date-picker (5.0.0):
- react-native-date-picker (5.0.4):
- React-Core
- react-native-document-picker (9.1.1):
- react-native-document-picker (9.3.0):
- React-Core
- react-native-image-picker (7.1.0):
- react-native-image-picker (7.1.2):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- react-native-pager-view (6.2.3):
- react-native-pager-view (6.3.3):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- react-native-safe-area-context (4.8.2):
- react-native-safe-area-context (4.10.7):
- React-Core
- react-native-slider (4.5.0):
- react-native-slider (4.5.2):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- react-native-webview (13.10.2):
- react-native-splash-screen (3.3.0):
- React-Core
- react-native-webview (13.10.4):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
Expand Down Expand Up @@ -1133,24 +1139,25 @@ PODS:
- React-jsi (= 0.73.2)
- React-logger (= 0.73.2)
- React-perflogger (= 0.73.2)
- RNCPicker (2.7.5):
- RNCPicker (2.7.7):
- React-Core
- RNGestureHandler (2.15.0):
- RNGestureHandler (2.17.1):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- RNKeychain (8.1.2):
- React-Core
- RNReanimated (3.7.2):
- RNReanimated (3.13.0):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- ReactCommon/turbomodule/core
- RNScreens (3.30.1):
- RNScreens (3.32.0):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- RNSVG (14.1.0):
- React-RCTImage
- RNSVG (14.2.0):
- React-Core
- SocketRocket (0.6.1)
- Yoga (1.14.0)
Expand Down Expand Up @@ -1183,6 +1190,8 @@ DEPENDENCIES:
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
- libevent (~> 2.1.12)
- lottie-ios (from `../node_modules/lottie-ios`)
- lottie-react-native (from `../node_modules/lottie-react-native`)
- OpenSSL-Universal (= 1.1.1100)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
Expand Down Expand Up @@ -1214,6 +1223,7 @@ DEPENDENCIES:
- react-native-pager-view (from `../node_modules/react-native-pager-view`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- "react-native-slider (from `../node_modules/@react-native-community/slider`)"
- react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
- react-native-webview (from `../node_modules/react-native-webview`)
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
Expand Down Expand Up @@ -1273,6 +1283,10 @@ EXTERNAL SOURCES:
hermes-engine:
:podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec"
:tag: hermes-2023-11-17-RNv0.73.0-21043a3fc062be445e56a2c10ecd8be028dd9cc5
lottie-ios:
:path: "../node_modules/lottie-ios"
lottie-react-native:
:path: "../node_modules/lottie-react-native"
RCT-Folly:
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
RCTRequired:
Expand Down Expand Up @@ -1327,6 +1341,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-safe-area-context"
react-native-slider:
:path: "../node_modules/@react-native-community/slider"
react-native-splash-screen:
:path: "../node_modules/react-native-splash-screen"
react-native-webview:
:path: "../node_modules/react-native-webview"
React-nativeconfig:
Expand Down Expand Up @@ -1385,7 +1401,7 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
boost: 26fad476bfa736552bbfa698a06cc530475c1505
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
FBLazyVector: fbc4957d9aa695250b55d879c1d86f79d7e69ab4
Expand All @@ -1399,9 +1415,11 @@ SPEC CHECKSUMS:
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
glog: 035f1e36e53b355cf70f6434d161b36e7d21fecd
hermes-engine: b361c9ef5ef3cda53f66e195599b47e1f84ffa35
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
lottie-ios: 69495122151a378fdc7d1bb4c5930347e37baf1f
lottie-react-native: 3e722c63015fdb9c27638b0a77969fc412067c18
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0
RCTRequired: 9b1e7e262745fb671e33c51c1078d093bd30e322
Expand All @@ -1424,13 +1442,14 @@ SPEC CHECKSUMS:
React-jsinspector: 03644c063fc3621c9a4e8bf263a8150909129618
React-logger: 66b168e2b2bee57bd8ce9e69f739d805732a5570
React-Mapbuffer: 9ee041e1d7be96da6d76a251f92e72b711c651d6
react-native-date-picker: 656d78c3f8a5e79bc1642b8d1c587ce10aab2195
react-native-document-picker: 3599b238843369026201d2ef466df53f77ae0452
react-native-image-picker: 6c51359eca7a7df9f07e297218c25696eb9da976
react-native-pager-view: d81ab2060b9caf57ca8c3a0d57467ff407cdb825
react-native-safe-area-context: 0ee144a6170530ccc37a0fd9388e28d06f516a89
react-native-slider: 7d387c7e8dd0b4c12bf49c975c8666435f082a33
react-native-webview: ef44a80406c863342b11887697bceb84b9ade802
react-native-date-picker: 6891317e850deae5b53d51355226e07a495aba61
react-native-document-picker: 5b97e24a7f1a1e4a50a72c540a043f32d29a70a2
react-native-image-picker: 994a97b28e7f2c2197e21801569bb19f6e494e38
react-native-pager-view: 51b8a98ed400354aea0250186669db6c66a6231f
react-native-safe-area-context: 422017db8bcabbada9ad607d010996c56713234c
react-native-slider: 07df44a6b615c6bf8584a5ee88288024b3cbf498
react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457
react-native-webview: 492d3b7828fca1c68168438f0e7c99bb8194050f
React-nativeconfig: d753fbbc8cecc8ae413d615599ac378bbf6999bb
React-NativeModulesApple: 964f4eeab1b4325e8b6a799cf4444c3fd4eb0a9c
React-perflogger: 29efe63b7ef5fbaaa50ef6eaa92482f98a24b97e
Expand All @@ -1451,14 +1470,14 @@ SPEC CHECKSUMS:
React-runtimescheduler: df8945a656356ff10f58f65a70820478bfcf33ad
React-utils: f5bc61e7ea3325c0732ae2d755f4441940163b85
ReactCommon: 45b5d4f784e869c44a6f5a8fad5b114ca8f78c53
RNCPicker: 3e2c37a8328f368ce14da050cdc8231deb5fc9f9
RNGestureHandler: deda62b8339496ba721a45e0f3e2d7a319932cee
RNCPicker: b7873ba797dc586bfaf3307d737cbdc620a9ff3e
RNGestureHandler: 1c2341f8a84794a483ed739c446dc9f3b5191908
RNKeychain: a65256b6ca6ba6976132cc4124b238a5b13b3d9c
RNReanimated: 3850671fd0c67051ea8e1e648e8c3e86bf3a28eb
RNScreens: 77fc79e66b726ee45b091486b348418ee1d792ab
RNSVG: ba3e7232f45e34b7b47e74472386cf4e1a676d0a
RNReanimated: 2fb8bf314df48f4968d9080aec46c47eb44a446a
RNScreens: f0edd01b3ab160acc31fb056622a1d7c2909a0a5
RNSVG: 963a95f1f5d512a13d11ffd50d351c87fb5c6890
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: e64aa65de36c0832d04e8c7bd614396c77a80047
Yoga: 13c8ef87792450193e117976337b8527b49e8c03

PODFILE CHECKSUM: eb490ed861c0caf2f2649ac9503532c4cce2d3d8

Expand Down
12 changes: 2 additions & 10 deletions ios/upcy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,7 @@
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down Expand Up @@ -763,11 +759,7 @@
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"@react-navigation/native-stack": "^6.9.17",
"@react-navigation/stack": "^6.3.20",
"axios": "^1.6.3",
"lottie-ios": "3.4.0",
"lottie-react-native": "5.1.5",
"punycode": "^2.3.1",
"react": "18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -45,7 +47,8 @@
"react-native-safe-area-context": "^4.8.2",
"react-native-safearea-height": "^1.0.6",
"react-native-screens": "^3.30.1",
"react-native-snap-carousel": "git+https://github.com/SJ-Kwak/react-native-snap-carousel.git",
"react-native-snap-carousel": "^3.9.1",
"react-native-splash-screen": "^3.3.0",
"react-native-status-bar-height": "^2.6.0",
"react-native-svg": "^14.1.0",
"react-native-tab-view": "^3.5.2",
Expand Down
1 change: 1 addition & 0 deletions src/assets/common/lottie/animation/SplashAnimation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"nm":"Happy face","ddd":0,"h":300,"w":279,"meta":{"g":"LottieFiles Figma v62"},"layers":[{"ty":4,"nm":"Ellipse 2","sr":1,"st":0,"op":163,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,44.5],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[27.09,44.5],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,44.5],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,27.71],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,44.5],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[27.09,44.5],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,44.5],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,27.71],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,44.5],"t":144},{"s":[43.5,44.5],"t":162}]},"s":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":144},{"s":[100,100],"t":162}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,149.5],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[138.09,149.5],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,149.5],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,132.71],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,149.5],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[155.91,149.5],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,149.5],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,166.29],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,149.5],"t":144},{"s":[139.5,149.5],"t":162}]},"r":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":144},{"s":[0],"t":162}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":144},{"s":[100],"t":162}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[43.5,44.5],[43.5,89],[0,44.5],[43.5,0],[43.5,44.5]]}],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,44.5],[0,44.5],[43.5,0],[87,44.5]]}],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[54.18,44.5],[10.68,89],[10.68,44.5],[10.68,0],[54.18,44.5]]}],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,10.92],[43.5,55.42],[0,10.92],[43.5,10.92],[87,10.92]]}],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":144},{"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":162}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0,0,0,1],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.0448,0.9952,0.0765,1],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.1701,0.9699,0.1968,1],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.3137,0.7569,0.3294,1],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.3167,0.1701,0.9699,1],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.1451,0,0.7686,1],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.3167,0.1701,0.9699,1],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.2392,0.2824,0.3255,1],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0,0.4,0,1],"t":144},{"s":[0,0,0,1],"t":162}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":144},{"s":[100],"t":162}]}}],"ind":1}],"v":"5.7.0","fr":60,"op":162,"ip":0,"assets":[]}
34 changes: 34 additions & 0 deletions src/common/SplashScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';
import LottieView from 'lottie-react-native';
import { Dimensions, View } from 'react-native';
import { PURPLE } from '../styles/GlobalColor';

const SplashScreen = ({ onFinish }: { onFinish: () => void }) => {
const { width, height } = Dimensions.get('screen');

return (
<View
style={{
height: height,
width: width,
backgroundColor: PURPLE,
justifyContent: 'center',
alignItems: 'center',
}}>
<View
style={{
width: '90%',
height: '80%',
}}>
<LottieView
source={require('../assets/common/lottie/animation/SplashAnimation.json')}
onAnimationFinish={onFinish}
loop={false}
autoPlay
/>
</View>
</View>
);
};

export default SplashScreen;
Loading

0 comments on commit e8becaf

Please sign in to comment.