fix(web): websocket reconnect (#7234)

* fix(web): websocket reconnect

* reset store after navigation completes

* remove loggedOut check
This commit is contained in:
Michel Heusschen 2024-02-20 15:20:09 +01:00 committed by GitHub
parent 7f5459f050
commit e7a875eadd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 21 deletions

View file

@ -1,8 +1,12 @@
import type { UserResponseDto } from '@immich/sdk';
import { writable } from 'svelte/store';
export let user = writable<UserResponseDto>();
export const user = writable<UserResponseDto>();
/**
* Reset the store to its initial undefined value. Make sure to
* only do this _after_ redirecting to an unauthenticated page.
*/
export const resetSavedUser = () => {
user = writable<UserResponseDto>();
user.set(undefined as unknown as UserResponseDto);
};