Created
September 12, 2019 01:13
-
-
Save perryraskin/6e156df06570b71ed7d09317bda03e55 to your computer and use it in GitHub Desktop.
Me.js vs Details.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { ScrollView, Button, View, Text } from 'react-native'; | |
import { createStackNavigator, createAppContainer } from 'react-navigation'; | |
import { Header, Actions, Info } from '../components/UserDetails/'; | |
import colors from '../config/colors'; | |
class Details extends Component { | |
render() { | |
const contact = this.props.navigation.state.params; | |
return ( | |
<ScrollView style={{ backgroundColor: colors.background }}> | |
<Header {...contact} /> | |
<Actions {...contact} /> | |
<Info {...contact} /> | |
<Button | |
title="Go back" | |
onPress={() => this.props.navigation.goBack(null)} | |
/> | |
</ScrollView> | |
); | |
} | |
} | |
export default Details; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View, Text, ScrollView } from 'react-native'; | |
import { Header, Actions, Info } from '../components/UserDetails'; | |
import colors from '../config/colors'; | |
import { me } from '../config/data'; | |
import { PrimaryButton } from '../components/Buttons'; | |
class Me extends Component { | |
render() { | |
return ( | |
<ScrollView style={{ backgroundColor: colors.background }}> | |
<Header {...me} /> | |
<PrimaryButton | |
label="Edit Profile" | |
onPress={() => null} | |
/> | |
<Actions {...me} /> | |
<Info {...me} /> | |
</ScrollView> | |
); | |
} | |
} | |
export default Me; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment