mirror of
https://github.com/immich-app/immich.git
synced 2025-01-10 13:56:47 +01:00
e7a875eadd
* fix(web): websocket reconnect * reset store after navigation completes * remove loggedOut check
12 lines
374 B
TypeScript
12 lines
374 B
TypeScript
import type { UserResponseDto } from '@immich/sdk';
|
|
import { writable } from 'svelte/store';
|
|
|
|
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.set(undefined as unknown as UserResponseDto);
|
|
};
|