Skip to content

Commit

Permalink
Merge pull request #880 from bcgov/daniel/logout
Browse files Browse the repository at this point in the history
Add Logout to Mobile Hamburger
  • Loading branch information
AlexZorkin authored Sep 5, 2024
2 parents 3e31fb7 + 9577441 commit 086be58
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 351 deletions.
12 changes: 10 additions & 2 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ import { NotFound } from './components/NotFound'
import ContactUs from './components/ContactUs'
import PublicLayout from './layouts/PublicLayout'
import { EditViewComplianceReport } from './views/ComplianceReports/EditViewComplianceReport'
import { AddEditNotionalTransfers } from './views/NotionalTransfers/AddEditNotionalTransfers'
import { AddEditNotionalTransfers } from '@/views/NotionalTransfers'
import { AddEditOtherUses } from './views/OtherUses/AddEditOtherUses'
import { AddEditFinalSupplyEquipments } from './views/FinalSupplyEquipments/AddEditFinalSupplyEquipments'
import { AddEditFuelSupplies } from './views/FuelSupplies/AddEditFuelSupplies'
import { AddEditAllocationAgreements } from './views/AllocationAgreements/AddAllocationAgreements'
import { logout } from '@/utils/keycloak.js'

const router = createBrowserRouter([
{
Expand Down Expand Up @@ -361,6 +362,13 @@ const router = createBrowserRouter([
element: <ContactUs />,
handle: { crumb: () => 'Contact Us' }
},
{
path: ROUTES.LOG_OUT,
loader: async () => {
logout()
return null
}
},
{
path: '*',
element: <NotFound />
Expand All @@ -369,4 +377,4 @@ const router = createBrowserRouter([

const App = () => <RouterProvider router={router} />

export default App
export default App
Loading

0 comments on commit 086be58

Please sign in to comment.