mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-02-25 03:16:37 -05:00
* Test * Add pretty formatting * Fix Tests * Fix Tests * Fix Tests * Fix * Add pretty formatting fix * Fix * Test * Fix tests * Clean typeckech * Add prettier check * Fix api tsconfig * Fix api tsconfig * Fix tsconfig * Fix * Fix * Prettier
16 lines
432 B
TypeScript
16 lines
432 B
TypeScript
import posthog from 'posthog-js'
|
|
import {clearUserCookie} from 'web/components/auth-context'
|
|
import {api} from 'web/lib/api'
|
|
import {firebaseLogout} from 'web/lib/firebase/users'
|
|
import {track} from 'web/lib/service/analytics'
|
|
|
|
export async function deleteAccount() {
|
|
track('delete account')
|
|
await api('me/delete')
|
|
await firebaseLogout()
|
|
clearUserCookie()
|
|
localStorage.clear()
|
|
sessionStorage.clear()
|
|
posthog.reset()
|
|
}
|