mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* Error is not displayed for functions with no return values. Fixes #2749 * fix tests * update paddings
19 lines
482 B
TypeScript
19 lines
482 B
TypeScript
import React from 'react';
|
|
|
|
import { Alert } from 'toolkit/chakra/alert';
|
|
|
|
export interface Props {
|
|
data: Error;
|
|
}
|
|
|
|
const ContractMethodResultPublicClient = ({ data }: Props) => {
|
|
|
|
return (
|
|
<Alert status="error" mt={ 3 } textStyle="sm" wordBreak="break-word" whiteSpace="pre-wrap">
|
|
{ 'shortMessage' in data && typeof data.shortMessage === 'string' ? data.shortMessage : data.message }
|
|
</Alert>
|
|
);
|
|
};
|
|
|
|
export default React.memo(ContractMethodResultPublicClient);
|