// Copyright 2019 @polkadot/extension-ui authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { OnActionFromCtx } from '../components/types'; import React from 'react'; import { RouteComponentProps, withRouter } from 'react-router'; import { Address, Button, Header, Tip, withOnAction } from '../components'; import { forgetAccount } from '../messaging'; import { Back } from '../partials'; type Props = RouteComponentProps<{ address: string }> & { onAction: OnActionFromCtx }; function Forget ({ match: { params: { address } }, onAction }: Props) { const onClick = () => forgetAccount(address) .then(() => onAction('/')) .catch(console.error); return (