Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Commit

Permalink
#502 Arrumando completamente
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriela Barrozo Guedes <[email protected]>
Signed-off-by: Felipe Campos <[email protected]>

Co-authored-by: Gabriela Barrozo Guedes <[email protected]>
  • Loading branch information
Felipe Campos and gabibguedes committed Jun 25, 2018
1 parent 9236f4f commit 64cda09
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Navigators/ListProfileNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ProfileSchedule from '../Routes/ProfileSchedule';
import {StackNavigator} from 'react-navigation';

const routes = {
listProfiles: {
profile: {
screen: ListProfile,
navigationOptions: {
header: null
Expand Down
9 changes: 8 additions & 1 deletion src/Navigators/NewProfileNavigator.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import NewProfile from '../Screens/NewProfile';
import ListProfile from '../Screens/ListProfile';
import {StackNavigator} from 'react-navigation';

const routes = {
profile: {
newProfile: {
screen: NewProfile,
navigationOptions: {
header: null
}
},
profile: {
screen: ListProfile,
navigationOptions: {
header: null
}
}
};

Expand Down
8 changes: 5 additions & 3 deletions src/Screens/NewProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,11 @@ class NewProfile extends React.Component {
if (error !== '') {
Alert.alert('Erro!', error);
} else {
console.log(store.getState().currentUser.id);
this.props.navigation.navigate('listProfiles');
Alert.alert('Novo profile feito com sucesso!');
Alert.alert(
'Sucesso',
'Seu perfil foi criado!',
[{text: 'ok', onPress: () => this.props.navigation.navigate('profile', {noSideBar: this.state.noSideBar})}]
);
}
});
}
Expand Down

0 comments on commit 64cda09

Please sign in to comment.