You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
323 B
11 lines
323 B
import { derived, writable } from "svelte/store"; |
|
|
|
/** |
|
* Stores the user's public key if logged in, or null otherwise. |
|
*/ |
|
export const userPubkey = writable<string | null>(null); |
|
|
|
/** |
|
* Derived store indicating if the user is logged in. |
|
*/ |
|
export const isLoggedIn = derived(userPubkey, ($userPubkey) => !!$userPubkey);
|
|
|