will fix asyncstorage later

midterm solution - passing lat and long as props
This commit is contained in:
Arjun Patel
2018-06-29 21:32:50 -07:00
parent 43ece13696
commit 6189437670
4 changed files with 65 additions and 9 deletions
+18 -2
View File
@@ -14,6 +14,7 @@ import {
import { Fonts } from '../utils/Fonts.js';
// imported components for different sections in main component
imoprt Dash from './main/dashboard.js';
import Navbar from './main/navbar.js';
import Chat from './main/chat.js';
import AdSpace from './main/adspace.js';
@@ -23,16 +24,26 @@ const windowHeight = Dimensions.get('window').height;
type Props = {};
export default class Main extends Component<Props> {
constructor(props) {
super(props);
this.position = {
long: this.props.long,
lat: this.props.lat
};
}
render() {
console.log('in Main');
return (
<View style={styles.container}>
<View style={styles.dashboard}>
<Dash />
</View>
<View style={styles.navbar}>
<Navbar />
</View>
<View style={styles.chat}>
<Chat />
<Chat position={this.position} />
</View>
<View style={styles.adspace}>
<AdSpace />
@@ -49,6 +60,11 @@ const styles = {
justifyContent: 'space-between',
position: 'relative'
},
dashboard: {
height: windowHeight,
width: windowWidth - 60,
backgroundColor: '#595a5b'
},
navbar: {
flex: 2
},