-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
75 lines (71 loc) · 1.93 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { Image, StyleSheet, Text, View } from 'react-native';
import CameraPage from './src/camerapage.js';
import FridgePage from './src/fridge.js';
import { NativeRouter, Route, Link, Switch } from "react-router-native";
import User from './src/user.js'
import Saved from './src/saved.js'
export default function App() {
return (
// <FridgePage/>
<NativeRouter>
<StatusBar style="auto" />
<View style={styles.container}>
<Link to="/" underlayColor="#f0f4f7" >
<Image style={styles.home} source={require('./src/Images/house.png')}></Image>
</Link>
<Link to="/fridge" underlayColor="#f0f4f7" >
<Image style={styles.fridge} source={require('./src/Images/fridge.png')}></Image>
</Link>
<Link to="/saved" underlayColor="#f0f4f7" >
<Image style={styles.saved} source={require('./src/Images/heart.png')}></Image>
</Link>
<Link to="/user" underlayColor="#f0f4f7" >
<Image style={styles.user} source={require('./src/Images/user.png')}></Image>
</Link>
</View>
<Route exact path='/' render={(props) => (<CameraPage/>) } />
<Route path="/fridge"><FridgePage/></Route>
<Route path="/saved"><Saved/></Route>
<Route path="/user"><User/></Route>
</NativeRouter>
);
}
const styles = StyleSheet.create({
container: {
backgroundColor: 'green',
position: 'relative',
top: 830,
alignItems: 'center',
justifyContent: 'center',
},
home:{
position: 'absolute',
left: -150,
width: 30,
height: 30,
flex: 1
},
fridge:{
position: 'absolute',
left: -60,
width: 30,
height: 30,
flex: 1
},
saved:{
position: 'absolute',
left: 30,
width: 27,
height: 27,
flex: 1
},
user:{
position: 'absolute',
left: 120,
width: 30,
height: 30,
flex: 1
}
});