forked from Hosam-hsm/react-native-twitter-poll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
34 lines (31 loc) · 1.04 KB
/
index.js
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
import * as React from 'react';
import { createStackNavigator } from '@react-navigation/stack';
import Home from './screens/Home';
import Create from './screens/Create';
import Store, { StoreProvider } from './store';
import { observer } from 'mobx-react';
import Button from './components/HeaderRightButton';
const store = new Store()
const Stack = createStackNavigator();
function TwitterPollNavigator() {
return (
<StoreProvider store={store}>
<Stack.Navigator>
<Stack.Screen
name="TwitterPollHome"
options={{
title: 'Feed',
}}
component={Home} />
<Stack.Screen
name="TwitterPollCreate"
options={{
title: '',
headerRight: () => <Button />
}}
component={Create} />
</Stack.Navigator>
</StoreProvider>
);
}
export default observer(TwitterPollNavigator);