-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ios.js
More file actions
44 lines (39 loc) · 837 Bytes
/
Copy pathindex.ios.js
File metadata and controls
44 lines (39 loc) · 837 Bytes
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
import React, { Component } from 'react';
import moment from 'moment'
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import DayItem from './src/DayItem';
export default class getDay extends Component {
days(){
const daysItem = [];
for (var i = 0; i < 7; i++) {
var day = moment().add(i, 'days').format('dddd');
daysItem.push(
<DayItem day={day} daysUntil={i + 1} key={i} />
)
}
return daysItem;
}
render() {
return (
<View style={styles.container}>
<View>
{this.days()}
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
}
});
AppRegistry.registerComponent('getDay', () => getDay);