Fix logout not working

pull/4417/head
Kamran Ahmed 1 year ago
parent 7e18c97e78
commit f256a5a9b0
  1. 5
      src/components/Navigation/navigation.ts

@ -2,7 +2,10 @@ import Cookies from 'js-cookie';
import { TOKEN_COOKIE_NAME } from '../../lib/jwt'; import { TOKEN_COOKIE_NAME } from '../../lib/jwt';
export function logout() { export function logout() {
Cookies.remove(TOKEN_COOKIE_NAME); Cookies.remove(TOKEN_COOKIE_NAME, {
path: '/',
domain: import.meta.env.DEV ? 'localhost' : '.roadmap.sh',
});
// Reloading will automatically redirect the user if required // Reloading will automatically redirect the user if required
window.location.reload(); window.location.reload();

Loading…
Cancel
Save