forked from coracle/flotilla
Add eject flow
This commit is contained in:
@@ -46,6 +46,8 @@ import {
|
||||
loadRelay,
|
||||
addSession,
|
||||
subscribe,
|
||||
clearStorage,
|
||||
dropSession,
|
||||
} from "@welshman/app"
|
||||
import {
|
||||
COMMENT,
|
||||
@@ -149,6 +151,19 @@ export const loginWithNip46 = async ({
|
||||
return true
|
||||
}
|
||||
|
||||
// Log out
|
||||
|
||||
export const logout = async () => {
|
||||
const $pubkey = pubkey.get()
|
||||
|
||||
if ($pubkey) {
|
||||
dropSession($pubkey)
|
||||
}
|
||||
|
||||
await clearStorage()
|
||||
localStorage.clear()
|
||||
}
|
||||
|
||||
// Loaders
|
||||
|
||||
export const loadUserData = (
|
||||
|
||||
Reference in New Issue
Block a user