1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

output error messages in UI

This commit is contained in:
Matthias Kretschmann 2022-01-12 17:48:52 +00:00
parent bd561a2510
commit 5d40121adc
4 changed files with 13 additions and 4 deletions

View File

@ -67,6 +67,12 @@
margin-bottom: 0;
}
.errorMessage {
margin-left: var(--spacer);
font-size: var(--font-size-small);
color: var(--brand-alert-red);
}
@keyframes loader {
to {
transform: rotate(360deg);

View File

@ -20,6 +20,9 @@ export function Feedback(): ReactElement {
)}
</h3>
<p className={styles.description}>{value.description}</p>
{value.errorMessage && (
<span className={styles.errorMessage}>{value.errorMessage}</span>
)}
</li>
))

View File

@ -58,7 +58,7 @@ export interface PublishFeedback {
description: string
status: 'success' | 'error' | 'pending' | 'active' | string
txCount: number
message?: string
errorMessage?: string
txHash?: string
}
}

View File

@ -106,7 +106,7 @@ export default function PublishPage({
'1': {
...prevState['1'],
status: 'error',
message: error.message
errorMessage: error.message
}
}))
}
@ -165,7 +165,7 @@ export default function PublishPage({
'2': {
...prevState['2'],
status: 'error',
message: error.message
errorMessage: error.message
}
}))
}
@ -224,7 +224,7 @@ export default function PublishPage({
'3': {
...prevState['3'],
status: 'error',
message: error.message
errorMessage: error.message
}
}))
}