Skip to content

Commit

Permalink
Merge pull request #15 from noahschutte/noah/refactor
Browse files Browse the repository at this point in the history
apply code style
  • Loading branch information
noahschutte authored Aug 2, 2016
2 parents 6a52b03 + 495f3e1 commit ed4b0f5
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 27 deletions.
3 changes: 2 additions & 1 deletion src/components/FBLogin.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React, { Component } from 'react';
import { View } from 'react-native';
import FBSDK, { AccessToken, LoginButton, LoginManager, GraphRequest, GraphRequestManager } from 'react-native-fbsdk';
import FBSDK, { AccessToken, LoginButton, GraphRequest, GraphRequestManager } from 'react-native-fbsdk';

export default class Login extends Component {
constructor(props) {
super(props);

this.state = {
user: null
};
Expand Down
7 changes: 5 additions & 2 deletions src/components/new_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class NewRequest extends Component {
super(props)

this.state = {
title: 'Placeholder',
title: '',
city: '',
state: '',
pizzas: '',
Expand All @@ -17,7 +17,10 @@ export default class NewRequest extends Component {
render() {
return (
<View style={styles.container}>
<Button text={'Cancel Request'} onPress={this.onCancelRequest.bind(this)} />
<Button
text={'Cancel Request'}
onPress={this.onCancelRequest.bind(this)}
/>

<Text>
New Request Form
Expand Down
12 changes: 1 addition & 11 deletions src/components/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,5 @@ const styles = StyleSheet.create({
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
}
});
12 changes: 6 additions & 6 deletions src/components/signin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,23 @@ export default class Signin extends Component {
render() {
return (
<View style={styles.container}>

<Text style={styles.welcome}>
Random Acts of Pizza
</Text>

<Login />

<Button
text={'User Profile'}
onPress={this.onProfilePress.bind(this)}
/>

<Button
text={'Go to Requests'}
onPress={this.onRequestsPress.bind(this)}
/>

</View>
)
}
Expand All @@ -41,10 +46,5 @@ const styles = StyleSheet.create({
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
}
});
14 changes: 8 additions & 6 deletions src/components/user_profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ export default class UserProfile extends Component {
render() {
return (
<View style={styles.container}>

<Button
text={'Back'}
onPress={this.onBackPress.bind(this)}
/>
text={'Back'}
onPress={this.onBackPress.bind(this)}
/>

<Text>
User Profile
Expand All @@ -25,10 +26,11 @@ export default class UserProfile extends Component {
<Text>
Email:
</Text>

<TextInput
onChangeText={(email) => this.setState({email})}
value={this.state.text}
style={styles.input}
onChangeText={(email) => this.setState({email})}
value={this.state.text}
style={styles.input}
/>

<Button
Expand Down
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { Component } from 'react';
import { Navigator } from 'react-native';
import Signin from './components/signin';
import UserProfile from './components/user_profile';
import Requests from './components/requests';
import NewRequest from './components/new_request';
import UserProfile from './components/user_profile';

const ROUTES = {
signin: Signin,
Expand All @@ -15,6 +15,7 @@ const ROUTES = {
export default class Raop extends Component {
constructor(props) {
super(props);

this.state = {
user: null
};
Expand Down

0 comments on commit ed4b0f5

Please sign in to comment.