Skip to content

Commit

Permalink
Merge pull request #84 from CaronaBoard/feedbackScreen
Browse files Browse the repository at this point in the history
feat: add feedback screen
  • Loading branch information
eduardomoroni authored Oct 3, 2017
2 parents 3bfd3e4 + 7271c3d commit 8b69b15
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/modules/settings/components/Feedback.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react'
import { WebView } from 'react-native'

export const Feedback = () => {
return (
<WebView
source={{uri: 'https://goo.gl/forms/TKrnuxGW9MclpIBD2'}}
style={{flex: 1}}
/>
)
}
16 changes: 15 additions & 1 deletion src/modules/settings/components/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export class Settings extends React.Component {
openProfile: PropTypes.func.isRequired,
resetPassword: PropTypes.func.isRequired,
logOut: PropTypes.func.isRequired,
eraseUserData: PropTypes.func.isRequired
eraseUserData: PropTypes.func.isRequired,
openFeedback: PropTypes.func.isRequired
}

render () {
Expand Down Expand Up @@ -62,6 +63,19 @@ export class Settings extends React.Component {
</TouchableOpacity>
</View>
</View>
<View style={styles.section}>
<View style={[styles.row, styles.heading]}>
<RkText rkType='primary header6'>Feedback</RkText>
</View>
<View style={styles.row}>
<TouchableOpacity
style={styles.rowButton}
onPress={() => this.props.openFeedback()}
>
<RkText rkType='header6'>Send us a feedback</RkText>
</TouchableOpacity>
</View>
</View>
</ScrollView>
)
}
Expand Down
8 changes: 8 additions & 0 deletions src/modules/settings/containers/SettingsContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ class SettingsContainer extends Component {
})
}

pushFeedbackScreen = () => {
this.props.navigator.push({
screen: screens.feedback.id,
title: screens.feedback.title
})
}

eraseUserData = () => {
destructiveAlert(
'If you confirm all your personal data will be erased from outr system,',
Expand Down Expand Up @@ -47,6 +54,7 @@ class SettingsContainer extends Component {
eraseUserData={this.eraseUserData}
logOut={this.logOutUser}
resetPassword={this.resetPassword}
openFeedback={this.pushFeedbackScreen}
/>
)
}
Expand Down
6 changes: 6 additions & 0 deletions src/navigation/Screens.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import YourRideOfferList from '../modules/rideOffer/containers/YourRideOffersScr
import YourRideRequestsScreen from '../modules/rideRequest/containers/YourRideRequestsScreen'
import SignInScreen from '../modules/authentication/containers/SignInScreen'
import Settings from '../modules/settings/containers/SettingsContainer'
import { Feedback } from '../modules/settings/components/Feedback'

export const screens = {
signIn: {
Expand Down Expand Up @@ -61,5 +62,10 @@ export const screens = {
id: 'settings.profile',
component: ProfileScreen,
title: 'Profile'
},
feedback: {
id: 'settings.feeback',
title: 'Feedback',
component: Feedback
}
}

0 comments on commit 8b69b15

Please sign in to comment.