/* * Copyright (C) 2026 Fluxer Contributors * * This file is part of Fluxer. * * Fluxer is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Fluxer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Fluxer. If not, see . */ import * as ModalActionCreators from '@app/actions/ModalActionCreators'; import * as UserActionCreators from '@app/actions/UserActionCreators'; import {Form} from '@app/components/form/Form'; import {FormErrorText} from '@app/components/form/FormErrorText'; import styles from '@app/components/modals/AccountDeleteModal.module.css'; import * as Modal from '@app/components/modals/Modal'; import {Button} from '@app/components/uikit/button/Button'; import {useFormSubmit} from '@app/hooks/useFormSubmit'; import * as RouterUtils from '@app/utils/RouterUtils'; import {Trans, useLingui} from '@lingui/react/macro'; import {observer} from 'mobx-react-lite'; import {useForm} from 'react-hook-form'; interface FormInputs { form: string; } export const AccountDeleteModal = observer(() => { const {t} = useLingui(); const form = useForm(); const onSubmit = async () => { await UserActionCreators.deleteAccount(); ModalActionCreators.pop(); RouterUtils.transitionTo('/login'); }; const {handleSubmit, isSubmitting} = useFormSubmit({ form, onSubmit, defaultErrorField: 'form', }); return (

Are you sure you want to delete your account? This action will schedule your account for permanent deletion.

Important information:

  • You can cancel the deletion process within 14 days
  • After 14 days, your account will be permanently deleted
  • Once deletion is processed, you cannot recover access to your account
  • You will not be able to delete your sent messages after your account is deleted

If you want to export your data or delete your messages first, please visit the Privacy Dashboard section in User Settings before proceeding.

); });