flotilla/src/app/util/logout.ts

15 lines
345 B
TypeScript
Raw Normal View History

2026-03-05 22:20:20 +00:00
import {kv, db} from "@app/core/storage"
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()
await db.clear()
localStorage.clear()
window.location.href = "/"
}