Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rex Dri
Rex Dri
Commits
53172e0d
Commit
53172e0d
authored
Aug 25, 2019
by
Florent Chehab
Browse files
fix(log out)
parent
20d21b13
Pipeline
#44497
passed with stages
in 3 minutes and 49 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
53172e0d
### [Versions](https://material-ui.com/versions/)
## Next
###### *TBD*
-
[
bug fix] Logout working on mobile ([#150
](
https://gitlab.utc.fr/rex-dri/rex-dri/issues/150
)
)
## v1.0.1
###### *23 Aug 2019*
...
...
frontend/src/components/app/App.js
View file @
53172e0d
...
...
@@ -29,6 +29,7 @@ import PageMyExchanges from "../pages/PageMyExchanges";
import
NotifierImportantInformation
from
"
./NotifierImportantInformation
"
;
import
FooterImportantInformation
from
"
./FooterImportantInformation
"
;
import
PageAboutUnlinkedPartners
from
"
../pages/PageAboutUnlinkedPartners
"
;
import
PageLogout
from
"
../pages/PageLogout
"
;
// import PageFiles from "../pages/PageFiles";
/**
...
...
@@ -59,6 +60,7 @@ class App extends CustomComponentForAPI {
<
Route
path
=
{
APP_ROUTES
.
aboutRgpd
}
component
=
{
PageRgpd
}
/
>
<
Route
path
=
{
APP_ROUTES
.
aboutCgu
}
component
=
{
PageCgu
}
/
>
<
Route
path
=
{
APP_ROUTES
.
aboutUnlinkedPartners
}
component
=
{
PageAboutUnlinkedPartners
}
/
>
<
Route
path
=
{
APP_ROUTES
.
logout
}
component
=
{
PageLogout
}
/
>
<
Route
component
=
{
PageNotFound
}
/
>
<
/Switch
>
<
/main
>
...
...
frontend/src/components/pages/PageLogout.js
0 → 100644
View file @
53172e0d
import
React
from
"
react
"
;
import
PropTypes
from
"
prop-types
"
;
import
{
APP_ROUTES
}
from
"
../../config/appRoutes
"
;
import
{
Typography
}
from
"
@material-ui/core
"
;
let
_triggered
=
false
;
/**
* Component to force user logout
*/
function
PageLogout
(
props
)
{
if
(
!
_triggered
)
{
_triggered
=
true
;
props
.
history
.
push
(
APP_ROUTES
.
logout
);
window
.
location
.
reload
();
// need to reload otherwise it might not work on mobile
}
return
<
Typography
variant
=
{
"
caption
"
}
>
Déconnexion
on
cours
...
<
/Typography>
;
}
PageLogout
.
propTypes
=
{
history
:
PropTypes
.
object
.
isRequired
,
};
export
default
PageLogout
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment