Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Rex Dri
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rex Dri
Rex Dri
Commits
53172e0d
Commit
53172e0d
authored
Aug 25, 2019
by
Florent Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
CHANGELOG.md
CHANGELOG.md
+6
-0
frontend/src/components/app/App.js
frontend/src/components/app/App.js
+2
-0
frontend/src/components/pages/PageLogout.js
frontend/src/components/pages/PageLogout.js
+28
-0
No files found.
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