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; margin-bottom: 0;
} }
.errorMessage {
margin-left: var(--spacer);
font-size: var(--font-size-small);
color: var(--brand-alert-red);
}
@keyframes loader { @keyframes loader {
to { to {
transform: rotate(360deg); transform: rotate(360deg);

View File

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

View File

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

View File

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