From 33e20df1c23cf116073e57a42b8be577a58b1267 Mon Sep 17 00:00:00 2001 From: Lisa-Ann B Date: Tue, 17 Oct 2023 18:26:14 -0400 Subject: [PATCH] Redirect to confirmation page on logout - #982 --- src/components/custom/js/functions.js | 4 ---- src/pages/logout.js | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/custom/js/functions.js b/src/components/custom/js/functions.js index c0cb9bd5f..30fb33ddd 100644 --- a/src/components/custom/js/functions.js +++ b/src/components/custom/js/functions.js @@ -332,10 +332,6 @@ export function goToSearch() { goIntent('search') } -export function gotToLogin() { - goIntent('login') -} - export function getEntityViewUrl(entity, uuid, {isEdit = false}) { const pre = isEdit ? '/edit' : '' return pre + "/" + entity?.toLowerCase() + "?uuid=" + uuid diff --git a/src/pages/logout.js b/src/pages/logout.js index 626ae35b0..318cb5f8e 100644 --- a/src/pages/logout.js +++ b/src/pages/logout.js @@ -1,16 +1,13 @@ import { useEffect, useContext } from 'react' import Spinner from '../components/custom/Spinner' import AppContext from '../context/AppContext' -import { gotToLogin } from '../components/custom/js/functions' import { getLogoutURL } from '../config/config' function logout() { const { logout } = useContext(AppContext) useEffect(() => { - const xhr = new XMLHttpRequest() - xhr.open('GET', getLogoutURL(), true) logout() - gotToLogin() + window.location = getLogoutURL() }) return }