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