-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
50 lines (44 loc) · 1.6 KB
/
App.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import {React, useState} from 'react';
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, View, Pressable, Alert } from 'react-native';
import { useQuery, ApolloClient, InMemoryCache, ApolloProvider, createHttpLink } from '@apollo/client';
import { NativeRouter, Link } from 'react-router-native';
import createApolloClient from './src/utils/apolloClient';
import UpdateButton from './src/components/UpdateBtn';
import theme from './src/styles/theme.js';
import LandingPage from './src/components/LandingPage';
import DropDownPicker from 'react-native-dropdown-picker';
import Text from './src/styles/Text';
const styles = StyleSheet.create({
container: {
flex: theme.container.flex,
backgroundColor: theme.container.backgroundColor,
alignItems: theme.container.alignItems,
justifyContent: theme.container.justifyContent,
},
textContainer: {
alignItems: 'center',
justifyContent: 'space-around',
flexDirection: 'row-reverse',
padding: 40,
backgroundColor: '#b6c7e3'
}
})
export default function App() {
const [ landing, setLanding ] = useState(true)
const client = createApolloClient()
return (
<ApolloProvider client={client} style={styles.textContainer}>
<NativeRouter>
<View style={styles.textContainer}>
<Link to="/station"><Text>station</Text></Link>
<Link to="/terve"><Text>welcome</Text></Link>
</View>
{landing ?
<LandingPage /> :
<View style={styles.container}><Text >takasivu</Text></View>
}
</NativeRouter>
</ApolloProvider>
);
}