Skip to content
This repository was archived by the owner on Aug 28, 2020. It is now read-only.

Commit 71bf34e

Browse files
committed
chore: adding default loader page
1 parent a27c932 commit 71bf34e

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

src/App.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { StatusBar } from 'react-native';
77
import { Route, Switch } from 'react-router-native';
88
import StorybookUI from '../storybook';
99
import { Providers } from './Providers';
10+
import Loader from './components/Loader';
1011
import Welcome from './components/Welcome';
1112
import Bluetooth from './components/Bluetooth';
1213
import Exposure from './components/Exposure';
@@ -15,13 +16,14 @@ import Scanning from './components/Scanning';
1516
const App: React.FC = () => {
1617
return (
1718
<Providers>
18-
<StatusBar barStyle="dark-content" backgroundColor="white" animated={true} />
19+
<StatusBar barStyle="dark-content" backgroundColor="transparent" animated={true} />
1920
{__DEV__ ? <Route path="/storybook" component={StorybookUI} /> : undefined}
2021
<Switch>
2122
<Route path="/bluetooth" component={Bluetooth} />
2223
<Route path="/exposure" component={Exposure} />
2324
<Route path="/scanning" component={Scanning} />
24-
<Route path="/" component={Welcome} />
25+
<Route path="/welcome" component={Welcome} />
26+
<Route path="/" component={Loader} />
2527
</Switch>
2628
</Providers>
2729
);

src/components/Loader.tsx

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from 'react';
2+
import { Text, View } from 'react-native';
3+
import layout from './Layout.less';
4+
import { useHistory } from 'react-router-native';
5+
import SparklesIcon from '../assets/sparkle.svg';
6+
7+
export const Loader: React.FC = () => {
8+
9+
const history = useHistory();
10+
11+
const handleConsent = (): void => {
12+
history.push('/bluetooth');
13+
};
14+
15+
return (
16+
<View className={layout.background}>
17+
<View className={layout.padder}>
18+
<SparklesIcon className={layout.icon} />
19+
<Text className={layout.title}>{'\n'}...</Text>
20+
</View>
21+
<View className={layout.padder}>
22+
<Text className={layout.description}>
23+
Getting Ready...
24+
</Text>
25+
</View>
26+
<View className={layout.padder}>
27+
<Text className={layout.testbullet}>
28+
{'\n'}
29+
{'\n'}
30+
</Text>
31+
<Text onPress={handleConsent} className={layout.button}>I consent</Text>
32+
</View>
33+
</View>
34+
);
35+
};
36+
37+
export default Loader;

0 commit comments

Comments
 (0)