mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
22 lines
596 B
TypeScript
22 lines
596 B
TypeScript
import React from 'react';
|
|
|
|
import { Alert } from 'toolkit/chakra/alert';
|
|
import { Link } from 'toolkit/chakra/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 } asChild>
|
|
<Alert status="warning">{ text }</Alert>
|
|
</Link>
|
|
);
|
|
};
|
|
|
|
export default React.memo(TxSocketAlert);
|