-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
36 lines (32 loc) · 1.11 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import React, {useEffect} from 'react';
import {SafeAreaView, StatusBar, View} from 'react-native';
import {DependenciesOf, injectComponent} from 'react-obsidian';
import {ApplicationGraph} from './src/di/ApplicationGraph';
import {Alert} from './src/alerts/alert';
import {Emoji} from './src/views/emoji';
import {DrawingView} from './src/drawing/drawingView';
import {Header} from './src/header/header';
import {Footer} from './src/views/footer';
import {Confetti} from './src/views/confetti';
type Injected = DependenciesOf<ApplicationGraph, 'startGameUseCase' | 'appearance'>;
const App = ({startGameUseCase, appearance}: Injected) => {
useEffect(() => {
startGameUseCase.start();
}, [startGameUseCase]);
return (
<View style={{backgroundColor: appearance.backgroundColor}}>
<StatusBar barStyle={appearance.statusBarStyle} />
<SafeAreaView>
<View>
<Emoji />
<DrawingView />
<Header />
<Confetti />
<Alert />
<Footer />
</View>
</SafeAreaView>
</View>
);
};
export default injectComponent(App, ApplicationGraph);