// Context import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs' // Hooks import { useContext } from 'react' import { useTranslation } from 'next-i18next' import { useAccount } from 'shared/hooks/use-account.mjs' import { useBackend } from 'shared/hooks/use-backend.mjs' // Components import { BackToAccountButton } from './shared.mjs' import { Popout } from 'shared/components/popout/index.mjs' export const ns = ['account', 'status'] export const RemoveAccount = () => { // Hooks const { signOut } = useAccount() const backend = useBackend() const { t } = useTranslation(ns) const { setLoadingStatus } = useContext(LoadingStatusContext) // Helper method to export account const removeAccount = async () => { setLoadingStatus([true, 'processingUpdate']) const result = await backend.removeAccount() if (result.success) { setLoadingStatus([true, 'nailedIt', true, true]) signOut() } else setLoadingStatus([true, 'backendError', true, false]) } return (

{t('noWayBack')}

) }