diff --git a/src/components/Authenticator/authenticator.ts b/src/components/Authenticator/authenticator.ts index c118265a3..183e3dc9f 100644 --- a/src/components/Authenticator/authenticator.ts +++ b/src/components/Authenticator/authenticator.ts @@ -45,7 +45,7 @@ function handleAuthenticated() { showHideAuthElements('show'); } -function handleAuthRequired() { +export function handleAuthRequired() { const token = Cookies.get(TOKEN_COOKIE_NAME); if (token) { handleAuthenticated(); diff --git a/src/components/Navigation/navigation.ts b/src/components/Navigation/navigation.ts index 516596016..ceab0a675 100644 --- a/src/components/Navigation/navigation.ts +++ b/src/components/Navigation/navigation.ts @@ -1,9 +1,11 @@ import Cookies from 'js-cookie'; import { TOKEN_COOKIE_NAME } from '../../lib/constants'; +import { handleAuthRequired } from '../Authenticator/authenticator'; function logout() { Cookies.remove(TOKEN_COOKIE_NAME); - window.location.href = '/'; + handleAuthRequired(); + window.location.reload(); } function bindEvents() { diff --git a/src/components/TopicOverlay/TopicOverlay.astro b/src/components/TopicOverlay/TopicOverlay.astro index a1f570c69..0ee43e7a9 100644 --- a/src/components/TopicOverlay/TopicOverlay.astro +++ b/src/components/TopicOverlay/TopicOverlay.astro @@ -38,15 +38,15 @@ const { contentContributionLink } = Astro.props; Mark as Done - - + +