aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/flash_messages/transaction_submitted.tsx
blob: 2a6d2a64b863b3ab413888bf1fc68a6f7911865c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { colors } from '@0xproject/react-shared';
import * as _ from 'lodash';
import * as React from 'react';

interface TransactionSubmittedProps {
    etherScanLinkIfExists?: string;
}

interface TransactionSubmittedState {}

export class TransactionSubmitted extends React.Component<TransactionSubmittedProps, TransactionSubmittedState> {
    public render(): React.ReactNode {
        if (_.isUndefined(this.props.etherScanLinkIfExists)) {
            return <div>Transaction submitted to the network</div>;
        } else {
            return (
                <div>
                    Transaction submitted to the network:{' '}
                    <a style={{ color: colors.white }} href={`${this.props.etherScanLinkIfExists}`} target="_blank">
                        Verify on Etherscan
                    </a>
                </div>
            );
        }
    }
}