Client - update user profile

This commit is contained in:
Sam 2020-07-11 18:42:46 +02:00
parent f53213b4e9
commit 1a689955d3
2 changed files with 10 additions and 3 deletions

View File

@ -55,7 +55,6 @@
$("li.nav-item").click(function(){
$("button.navbar-toggler").toggleClass("collapsed");
$("#navbarSupportedContent").toggleClass("show");
console.log('toto')
});
});
</script>

View File

@ -17,6 +17,7 @@ function ProfileDetail({
message,
onDeletePicture,
onUploadPicture,
pathname,
t,
user,
}) {
@ -160,9 +161,15 @@ function ProfileDetail({
)}
<button
className="btn btn-secondary"
onClick={() => history.push('/')}
onClick={() =>
pathname === '/profile' ? history.push('/') : history.go(-1)
}
>
{t('common:Back to home')}
{t(
pathname === '/profile'
? 'common:Back to home'
: 'common:Back'
)}
</button>
</div>
</div>
@ -177,6 +184,7 @@ export default withTranslation()(
connect(
state => ({
appConfig: state.application.config,
pathname: state.router.location.pathname,
message: state.message,
}),
dispatch => ({