Skip to content

Commit

Permalink
ESLINT- Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaseTeichmann committed Oct 15, 2019
1 parent 1109f0d commit 3cd6e09
Show file tree
Hide file tree
Showing 13 changed files with 537 additions and 442 deletions.
73 changes: 39 additions & 34 deletions Routinely/app/components/alarm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { AppRegistry, Text, View, TextInput, StyleSheet, TouchableHighlight, Image} from 'react-native';
import React, {Component} from 'react';
import {View, StyleSheet, TouchableHighlight, Image} from 'react-native';
import DayPicker from './alarm_components/DayPicker';
import RepeatDiv from './alarm_components/RepeatDiv';
import SnoozeDuration from './alarm_components/SnoozeDuration';
Expand All @@ -12,46 +12,51 @@ class AlarmScreen extends Component {
render() {
return (
<View>
<TitleInput/>
<TimePicker/>
<RepeatDiv/>
<Divider/>
<DayPicker/>
<Divider/>
<SnoozeDuration/>
<Divider/>
<ColorPicker/>
<Divider/>
<TitleInput />
<TimePicker />
<RepeatDiv />
<Divider />
<DayPicker />
<Divider />
<SnoozeDuration />
<Divider />
<ColorPicker />
<Divider />
<View style={styles.container}>
<View style={{flexDirection:"row"}}>
<TouchableHighlight onPress={() => this.props.navigation.navigate('Calendar')}>
<Image
style={styles.contain}
source={require('./img/calendar.png')}
/>
</TouchableHighlight>
<TouchableHighlight onPress={() => this.props.navigation.navigate('Alarm')}>
<Image
style={styles.contain}
source={require('./img/alarm.png')}
/>
</TouchableHighlight>
<TouchableHighlight onPress={() => {this.signOut}}>
<Image
style={styles.contain}
source={require('./img/logout.png')}
/>
</TouchableHighlight>
</View>
<View style={{flexDirection: 'row'}}>
<TouchableHighlight
onPress={() => this.props.navigation.navigate('Calendar')}>
<Image
style={styles.contain}
source={require('./img/calendar.png')}
/>
</TouchableHighlight>
<TouchableHighlight
onPress={() => this.props.navigation.navigate('Alarm')}>
<Image
style={styles.contain}
source={require('./img/alarm.png')}
/>
</TouchableHighlight>
<TouchableHighlight
onPress={() => {
this.signOut;
}}>
<Image
style={styles.contain}
source={require('./img/logout.png')}
/>
</TouchableHighlight>
</View>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container:{
container: {
paddingTop: 10,
paddingLeft: 40,
paddingLeft: 40,
paddingRight: 20,
paddingBottom: 5,
},
Expand Down
16 changes: 6 additions & 10 deletions Routinely/app/components/alarmRinging.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
import React, { Component } from 'react';
import { AppRegistry, Text, View, StyleSheet, Button } from 'react-native';
import React, {Component} from 'react';
import {AppRegistry, Text, View, StyleSheet, Button} from 'react-native';
import DisplayTime from './alarmRinging_components/DisplayTime';


class AlarmRingingScreen extends Component {
render() {
return (
<View>
<DisplayTime/>
<DisplayTime />
<Button
title="Calendar"
onPress={() => this.props.navigation.navigate('Calendar')}
/>
<Button
<Button
title="Logout"
onPress={() => this.props.navigation.navigate('Login')}
/>
</View>

);
}
}
}

const styles = StyleSheet.create({

});
const styles = StyleSheet.create({});

export default AlarmRingingScreen;
84 changes: 45 additions & 39 deletions Routinely/app/components/alarmRinging_components/DisplayTime.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@

import React, { Component } from 'react';
import { AppRegistry, View, Text, StyleSheet, Platform } from 'react-native';
import React, {Component} from 'react';
import {AppRegistry, View, Text, StyleSheet, Platform} from 'react-native';

export default class DisplayTime extends Component {

constructor() {
super();

this.state = { currentTime: null, currentDay: null }
this.daysArray = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'];
this.state = {currentTime: null, currentDay: null};
this.daysArray = [
'sunday',
'monday',
'tuesday',
'wednesday',
'thursday',
'friday',
'saturday',
'sunday',
];
}

componentDidMount() {
Expand All @@ -33,24 +40,25 @@ export default class DisplayTime extends Component {
hour = hour - 12;
}

if (hour == 0) {
if (hour === 0) {
hour = 12;
}

if (new Date().getHours() < 12) {
am_pm = 'am';
}

this.setState({ currentTime: hour + ':' + minutes + ':' + seconds + ' ' + am_pm });
this.setState({
currentTime: hour + ':' + minutes + ':' + seconds + ' ' + am_pm,
});

this.daysArray.map((item, key) => {
if (key == new Date().getDay()) {
this.setState({ currentDay: item.toUpperCase() });
if (key === new Date().getDay()) {
this.setState({currentDay: item.toUpperCase()});
}
})
}
});
};
render() {

return (
<View style={styles.container}>
<View>
Expand All @@ -63,29 +71,27 @@ export default class DisplayTime extends Component {
}
}
AppRegistry.registerComponent('DisplayTime', () => DisplayTime);
const styles = StyleSheet.create(
{
container: {
flex: 1,
paddingTop: (Platform.OS === 'ios') ? 20 : 0,
justifyContent: 'center',
alignItems: 'center',
},
headerText: {
fontSize: 30,
textAlign: "center",
margin: 10,
color: 'black',
fontWeight: "bold"
},
timeText: {
fontSize: 50,
color: '#f44336'
},
daysText: {
color: '#2196f3',
fontSize: 25,
paddingBottom: 0
}

});
const styles = StyleSheet.create({
container: {
flex: 1,
paddingTop: Platform.OS === 'ios' ? 20 : 0,
justifyContent: 'center',
alignItems: 'center',
},
headerText: {
fontSize: 30,
textAlign: 'center',
margin: 10,
color: 'black',
fontWeight: 'bold',
},
timeText: {
fontSize: 50,
color: '#f44336',
},
daysText: {
color: '#2196f3',
fontSize: 25,
paddingBottom: 0,
},
});
40 changes: 20 additions & 20 deletions Routinely/app/components/alarm_components/ColorPicker.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import React, { Component } from 'react';
import { AppRegistry, Text, View, StyleSheet, TouchableHighlight } from 'react-native';
import { Button, Divider, ButtonGroup } from 'react-native-elements';
import React, {Component} from 'react';
import {AppRegistry, Text, View, StyleSheet} from 'react-native';
import {Button, Divider} from 'react-native-elements';

export default class colorPicker extends Component {
render() {
render() {
return (
<View style = {styles.container}>
<Text style = {styles.colorTitle}>Color</Text>
<Divider/>
<Button buttonStyle = {styles.colorCircleYellow} title=''></Button>
<Button buttonStyle = {styles.colorCircleRed} title=''></Button>
<Button buttonStyle = {styles.colorCircleGreen} title=''></Button>
<Button buttonStyle = {styles.colorCirclePink} title=''></Button>
<Button buttonStyle = {styles.colorCircleBlue} title=''></Button>
<View style={styles.container}>
<Text style={styles.colorTitle}>Color</Text>
<Divider />
<Button buttonStyle={styles.colorCircleYellow} title="" />
<Button buttonStyle={styles.colorCircleRed} title="" />
<Button buttonStyle={styles.colorCircleGreen} title="" />
<Button buttonStyle={styles.colorCirclePink} title="" />
<Button buttonStyle={styles.colorCircleBlue} title="" />
</View>
);
}
}
AppRegistry.registerComponent('colorPicker', () => colorPicker);

const styles = StyleSheet.create({
colorCircleRed:{
colorCircleRed: {
backgroundColor: 'red',
borderColor: 'white',
borderRadius: 100,
Expand All @@ -29,7 +29,7 @@ const styles = StyleSheet.create({
height: 40,
flexDirection: 'row',
},
colorCircleBlue:{
colorCircleBlue: {
backgroundColor: 'blue',
borderColor: 'white',
borderRadius: 100,
Expand All @@ -38,7 +38,7 @@ const styles = StyleSheet.create({
height: 40,
flexDirection: 'row',
},
colorCircleGreen:{
colorCircleGreen: {
backgroundColor: 'limegreen',
borderColor: 'white',
borderRadius: 100,
Expand All @@ -47,7 +47,7 @@ const styles = StyleSheet.create({
height: 40,
flexDirection: 'row',
},
colorCircleYellow:{
colorCircleYellow: {
backgroundColor: 'yellow',
borderColor: 'white',
borderRadius: 100,
Expand All @@ -56,7 +56,7 @@ const styles = StyleSheet.create({
height: 40,
flexDirection: 'row',
},
colorCirclePink:{
colorCirclePink: {
backgroundColor: 'pink',
borderColor: 'white',
borderRadius: 100,
Expand All @@ -65,7 +65,7 @@ const styles = StyleSheet.create({
height: 40,
flexDirection: 'row',
},
colorTitle:{
colorTitle: {
fontSize: 20,
color: 'darkgrey',
fontWeight: '600',
Expand All @@ -74,6 +74,6 @@ const styles = StyleSheet.create({
container: {
flexDirection: 'row',
justifyContent: 'space-between',
padding: 10
}
padding: 10,
},
});
Loading

0 comments on commit 3cd6e09

Please sign in to comment.