Files
explore/ui/tx/TxSocketAlert.tsx

22 lines
581 B
TypeScript

import React from 'react';
import { Alert } from '@luxfi/ui/alert';
import { Link } from 'toolkit/next/link';
interface Props {
status: 'error' | 'close';
}
const TxSocketAlert = ({ status }: Props) => {
const text = status === 'close' ?
'Connection is lost. Please click here to update transaction info.' :
'An error has occurred while fetching transaction info. Please click here to update.';
return (
<Link href={ window.document.location.href }>
<Alert status="warning">{ text }</Alert>
</Link>
);
};
export default React.memo(TxSocketAlert);