Client - update user profile
This commit is contained in:
parent
f53213b4e9
commit
1a689955d3
@ -55,7 +55,6 @@
|
|||||||
$("li.nav-item").click(function(){
|
$("li.nav-item").click(function(){
|
||||||
$("button.navbar-toggler").toggleClass("collapsed");
|
$("button.navbar-toggler").toggleClass("collapsed");
|
||||||
$("#navbarSupportedContent").toggleClass("show");
|
$("#navbarSupportedContent").toggleClass("show");
|
||||||
console.log('toto')
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -17,6 +17,7 @@ function ProfileDetail({
|
|||||||
message,
|
message,
|
||||||
onDeletePicture,
|
onDeletePicture,
|
||||||
onUploadPicture,
|
onUploadPicture,
|
||||||
|
pathname,
|
||||||
t,
|
t,
|
||||||
user,
|
user,
|
||||||
}) {
|
}) {
|
||||||
@ -160,9 +161,15 @@ function ProfileDetail({
|
|||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
className="btn btn-secondary"
|
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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -177,6 +184,7 @@ export default withTranslation()(
|
|||||||
connect(
|
connect(
|
||||||
state => ({
|
state => ({
|
||||||
appConfig: state.application.config,
|
appConfig: state.application.config,
|
||||||
|
pathname: state.router.location.pathname,
|
||||||
message: state.message,
|
message: state.message,
|
||||||
}),
|
}),
|
||||||
dispatch => ({
|
dispatch => ({
|
||||||
|
Loading…
Reference in New Issue
Block a user