import * as React from "react"; import { Widget, WidgetHeader, WidgetBody, Col, Row } from "../../ui"; import { DangerousDeleteProps, DangerousDeleteState } from "../interfaces"; import { BlurablePassword } from "../../ui/blurable_password"; import { t } from "../../i18next_wrapper"; /** Widget for permanently deleting large amounts of user data. */ export class DangerousDeleteWidget extends React.Component { state: DangerousDeleteState = { password: "" }; componentWillUnmount() { this.setState({ password: "" }); } onClick = () => this.props.dispatch(this.props.onClick({ password: this.state.password })); render() { return
{t(this.props.warning)}

{t(this.props.confirmation)}

this.setState({ password: e.currentTarget.value })} />
; } }