feat: logout prev user before accepting new invite

This commit is contained in:
Rotimi Best
2024-07-08 07:13:00 +01:00
parent d87fceeaa5
commit 13b493f22b
2 changed files with 9 additions and 3 deletions
@@ -12,9 +12,10 @@
import AuthUI from '$lib/components/AuthUI/index.svelte';
import { currentOrg, currentOrgPath } from '$lib/utils/store/org';
import { setTheme } from '$lib/utils/functions/theme';
import type { CurrentOrg } from '$lib/utils/types/org.js';
import type { CurrentOrg } from '$lib/utils/types/org';
import { onMount } from 'svelte';
import type { Profile } from '$lib/components/Course/components/People/types';
import { logout } from '$lib/utils/functions/logout';
export let data;
@@ -128,6 +129,8 @@
onMount(() => {
setTheme(data.currentOrg?.theme || '');
logout(false);
});
$: errors.confirmPassword = getConfirmPasswordError(fields);