misc: delete community from sessionstorage after leave
This commit is contained in:
1 parent
6c7073fcfc
commit
d24e94b365
1 file changed
+3
-1
@@ -4,7 +4,7 @@
|
|||||||
import Card from '$lib/components/ui/Card.svelte'
|
import Card from '$lib/components/ui/Card.svelte'
|
||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
import { onMount } from 'svelte'
|
import { onMount } from 'svelte'
|
||||||
import { getSessionStorage } from '$lib/session.js'
|
import { getSessionStorage, setSessionStorage } from '$lib/session.js'
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (!$profile?.jwt) {
|
if (!$profile?.jwt) {
|
||||||
@@ -15,6 +15,8 @@
|
|||||||
let community = getSessionStorage('lastSeenCommunity') as
|
let community = getSessionStorage('lastSeenCommunity') as
|
||||||
| { id: number; name: string }
|
| { id: number; name: string }
|
||||||
| undefined
|
| undefined
|
||||||
|
|
||||||
|
setSessionStorage('lastSeenCommunity', undefined)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|||||||
Reference in new issue
Block a user