Skip to content

Commit

Permalink
Update formatting to older syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
dshaps10 committed May 15, 2016
1 parent ac852e2 commit dcf23e6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
24 changes: 13 additions & 11 deletions App/Components/Trail.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
MapView,
ScrollView,
Image,
TabBarIOS,
View
} from 'react-native';

Expand Down Expand Up @@ -68,10 +69,11 @@ const styles = StyleSheet.create({
}
});

class Trail extends Component {
var Trail = React.createClass ({

getInitialState: function() {
return: {
return {
id: 0,
title: '',
description: '',
image_url: '',
Expand All @@ -83,28 +85,28 @@ class Trail extends Component {
elevation_up: 0,
elevation_down: 0,
terrain: ''
}
}
};
},

getTrail() {
getSpecificTrail(1)
getTrail: function() {
getSpecificTrail(this.state.id)
.then((data) => {
console.log(data)
this.setState(data);
});
}
},

onLinkPressed() {
console.log('pressed');
}
},

render() {
return(
<View style={styles.container}>

<View style={styles.titleWrapper}>
<Image
source={require('../../bayTrail.png')}
source={this.state.map_url}
style={styles.image} />
</View>
<View style={styles.header}>
Expand Down Expand Up @@ -145,6 +147,6 @@ class Trail extends Component {
</View>
);
}
}
});

module.exports = Trail;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"dependencies": {
"react": "^0.14.8",
"react-native": "^0.25.1"
"react-native": "^0.25.1",
"react-native-drawer": "^2.2.2"
}
}

0 comments on commit dcf23e6

Please sign in to comment.