File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import StacksRunDetail from '../ui/layouts/stacks/RunDetail';
2121import RunsRunDetail from '../ui/layouts/runs/RunDetail' ;
2222import ComponentRunDetail from '../ui/layouts/stackComponents/RunDetail' ;
2323import SettingsPage from '../ui/layouts/settings/SettingsPage' ;
24+ import { Logout } from '../ui/components/Logout' ;
2425
2526const routes = [
2627 {
@@ -331,6 +332,14 @@ const routes = [
331332 } ,
332333 exact : true ,
333334 } ,
335+ {
336+ path : routePaths . logout ,
337+ Component : Logout ,
338+ visibility : {
339+ authentication : RouteVisibilityAuthentication . authenticatedOnly ,
340+ } ,
341+ exact : true ,
342+ } ,
334343] ;
335344
336345export const appRoutesConfig = [ ...routes ] as RouteInterface [ ] ;
Original file line number Diff line number Diff line change @@ -80,4 +80,5 @@ export const routePaths = {
8080 personalDetails : '/settings/personal-details' ,
8181 organizationSettings : '/settings/organization' ,
8282 } ,
83+ logout : '/logout' ,
8384} ;
Original file line number Diff line number Diff line change 1+ /* eslint-disable */
2+
3+ import { useEffect } from 'react' ;
4+ import { sessionActions } from '../../redux/actions/session' ;
5+ import { useDispatch } from '../hooks' ;
6+
7+ export const Logout = ( ) => {
8+ const dispatch = useDispatch ( ) ;
9+
10+ useEffect ( ( ) => {
11+ dispatch ( sessionActions . logout ( ) ) ;
12+ } ) ;
13+
14+ return null ;
15+ } ;
You can’t perform that action at this time.
0 commit comments