mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 01:34:57 +01:00
force reload button
This commit is contained in:
parent
89709cbe73
commit
47381639ff
@ -2,6 +2,7 @@ import Loader from '../../../atoms/Loader'
|
||||
import SuccessConfetti from '../../../atoms/SuccessConfetti'
|
||||
import React, { ReactElement } from 'react'
|
||||
import styles from './Feedback.module.css'
|
||||
import Button from '../../../atoms/Button'
|
||||
|
||||
export default function Feedback({
|
||||
success,
|
||||
@ -10,10 +11,21 @@ export default function Feedback({
|
||||
success: string
|
||||
pricingStepText: string
|
||||
}): ReactElement {
|
||||
const SuccessAction = () => (
|
||||
<Button
|
||||
style="primary"
|
||||
size="small"
|
||||
className={styles.action}
|
||||
onClick={() => window?.location.reload()}
|
||||
>
|
||||
Reload Page
|
||||
</Button>
|
||||
)
|
||||
|
||||
return (
|
||||
<div className={styles.feedback}>
|
||||
{success ? (
|
||||
<SuccessConfetti success={success} />
|
||||
<SuccessConfetti success={success} action={<SuccessAction />} />
|
||||
) : (
|
||||
<Loader message={pricingStepText} />
|
||||
)}
|
||||
|
@ -84,7 +84,9 @@ export default function Pricing({ ddo }: { ddo: DDO }): ReactElement {
|
||||
}
|
||||
|
||||
// Pricing succeeded
|
||||
setSuccess(`🎉 Successfully created a ${values.type} price. 🎉 `)
|
||||
setSuccess(
|
||||
`🎉 Successfully created a ${values.type} price. 🎉 Reload the page to get all updates.`
|
||||
)
|
||||
Logger.log(`Transaction: ${tx}`)
|
||||
} catch (error) {
|
||||
toast.error(error.message)
|
||||
|
Loading…
Reference in New Issue
Block a user