From b7743fd5c9fd862694bb60a6c793aafcd0765839 Mon Sep 17 00:00:00 2001 From: Samuel Therrien Date: Tue, 10 Dec 2024 13:39:02 -0500 Subject: [PATCH] Logout confirmation modal --- .github/workflows/canopeum_deploy.yml | 6 ++--- canopeum_frontend/src/components/Navbar.tsx | 4 ++-- .../context/AuthenticationContext.tsx | 23 +++++++++++++++++-- .../components/dialogs/ConfirmationDialog.tsx | 12 ++++------ canopeum_frontend/src/locale/en/auth.ts | 1 + canopeum_frontend/src/locale/fr/auth.ts | 1 + .../src/pages/UserManagement.tsx | 4 ++-- 7 files changed, 34 insertions(+), 17 deletions(-) diff --git a/.github/workflows/canopeum_deploy.yml b/.github/workflows/canopeum_deploy.yml index e767646ec..e1d089ad1 100644 --- a/.github/workflows/canopeum_deploy.yml +++ b/.github/workflows/canopeum_deploy.yml @@ -28,7 +28,7 @@ on: jobs: GetDateTime: runs-on: ubuntu-latest - if: ${{ inputs.deploy_frontend && inputs.deploy_backend }} + if: ${{ github.event_name == 'push' || (inputs.deploy_frontend && inputs.deploy_backend) }} outputs: DATETIME: ${{ steps.datetime.outputs.DATETIME }} steps: @@ -39,7 +39,7 @@ jobs: BuildFrontend: name: Build & Deploy Frontend runs-on: ubuntu-latest - if: ${{ inputs.deploy_frontend }} + if: ${{ github.event_name == 'push' || inputs.deploy_frontend }} needs: [GetDateTime] defaults: run: @@ -68,7 +68,7 @@ jobs: BuildBackend: name: Build & Deploy Backend runs-on: ubuntu-latest - if: ${{ inputs.deploy_backend }} + if: ${{ github.event_name == 'push' || inputs.deploy_backend }} needs: [GetDateTime] defaults: run: diff --git a/canopeum_frontend/src/components/Navbar.tsx b/canopeum_frontend/src/components/Navbar.tsx index eec70785a..c7a1867dd 100644 --- a/canopeum_frontend/src/components/Navbar.tsx +++ b/canopeum_frontend/src/components/Navbar.tsx @@ -58,7 +58,7 @@ const Navbar = () => { void changeLanguage(newLanguage) } - const { isAuthenticated, logout } = useContext(AuthenticationContext) + const { isAuthenticated, showLogoutModal } = useContext(AuthenticationContext) return (