flotilla/src/app/util/logout.ts

16 lines
368 B
TypeScript
Raw Normal View History

2026-03-24 00:51:51 +00:00
import {db, kv, ss} from "@app/core/storage"
2026-03-05 22:20:20 +00:00
import {Push} from "@app/util/notifications"
import {deactivateCurrentPomadeSession} from "@app/util/pomade"
2026-03-05 22:20:20 +00:00
export const logout = async () => {
await deactivateCurrentPomadeSession()
2026-03-05 22:20:20 +00:00
await Push.disable()
await kv.clear()
2026-03-24 00:51:51 +00:00
await ss.clear()
2026-03-05 22:20:20 +00:00
await db.clear()
localStorage.clear()
window.location.href = "/"
}