fix: display error status
This commit is contained in:
parent
a29f3fc13c
commit
65e5c12b92
3 changed files with 15 additions and 8 deletions
|
|
@ -17,6 +17,7 @@ const CopyToClipboard = ({
|
||||||
buttonClassname,
|
buttonClassname,
|
||||||
children,
|
children,
|
||||||
wrapperClassname,
|
wrapperClassname,
|
||||||
|
removeSpace = true,
|
||||||
...props
|
...props
|
||||||
}) => {
|
}) => {
|
||||||
const [anchorEl, setAnchorEl] = useState(null)
|
const [anchorEl, setAnchorEl] = useState(null)
|
||||||
|
|
@ -46,7 +47,8 @@ const CopyToClipboard = ({
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
<div className={classnames(classes.buttonWrapper, buttonClassname)}>
|
<div className={classnames(classes.buttonWrapper, buttonClassname)}>
|
||||||
<ReactCopyToClipboard text={R.replace(/\s/g, '')(children)}>
|
<ReactCopyToClipboard
|
||||||
|
text={removeSpace ? R.replace(/\s/g, '')(children) : children}>
|
||||||
<button
|
<button
|
||||||
aria-describedby={id}
|
aria-describedby={id}
|
||||||
onClick={event => handleClick(event)}>
|
onClick={event => handleClick(event)}>
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,13 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
||||||
<>
|
<>
|
||||||
<Label>Transaction status</Label>
|
<Label>Transaction status</Label>
|
||||||
<span className={classes.bold}>{getStatus(tx)}</span>
|
<span className={classes.bold}>{getStatus(tx)}</span>
|
||||||
|
{getStatusDetails(tx) ? (
|
||||||
|
<CopyToClipboard removeSpace={false} className={classes.errorCopy}>
|
||||||
|
{getStatusDetails(tx)}
|
||||||
|
</CopyToClipboard>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -392,13 +399,7 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.lastRow}>
|
<div className={classes.lastRow}>
|
||||||
<div className={classes.status}>
|
<div className={classes.status}>
|
||||||
{getStatusDetails(tx) ? (
|
{errorElements}
|
||||||
<HoverableTooltip parentElements={errorElements} width={200}>
|
|
||||||
<P>{getStatusDetails(tx)}</P>
|
|
||||||
</HoverableTooltip>
|
|
||||||
) : (
|
|
||||||
errorElements
|
|
||||||
)}
|
|
||||||
{((tx.txClass === 'cashOut' && getStatus(tx) === 'Pending') ||
|
{((tx.txClass === 'cashOut' && getStatus(tx) === 'Pending') ||
|
||||||
(tx.txClass === 'cashIn' && getStatus(tx) === 'Batched')) && (
|
(tx.txClass === 'cashIn' && getStatus(tx) === 'Batched')) && (
|
||||||
<ActionButton
|
<ActionButton
|
||||||
|
|
|
||||||
|
|
@ -137,5 +137,9 @@ export default {
|
||||||
},
|
},
|
||||||
swept: {
|
swept: {
|
||||||
width: 250
|
width: 250
|
||||||
|
},
|
||||||
|
errorCopy: {
|
||||||
|
lineBreak: 'normal',
|
||||||
|
maxWidth: 180
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue