mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 09:44:53 +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 SuccessConfetti from '../../../atoms/SuccessConfetti'
|
||||||
import React, { ReactElement } from 'react'
|
import React, { ReactElement } from 'react'
|
||||||
import styles from './Feedback.module.css'
|
import styles from './Feedback.module.css'
|
||||||
|
import Button from '../../../atoms/Button'
|
||||||
|
|
||||||
export default function Feedback({
|
export default function Feedback({
|
||||||
success,
|
success,
|
||||||
@ -10,10 +11,21 @@ export default function Feedback({
|
|||||||
success: string
|
success: string
|
||||||
pricingStepText: string
|
pricingStepText: string
|
||||||
}): ReactElement {
|
}): ReactElement {
|
||||||
|
const SuccessAction = () => (
|
||||||
|
<Button
|
||||||
|
style="primary"
|
||||||
|
size="small"
|
||||||
|
className={styles.action}
|
||||||
|
onClick={() => window?.location.reload()}
|
||||||
|
>
|
||||||
|
Reload Page
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.feedback}>
|
<div className={styles.feedback}>
|
||||||
{success ? (
|
{success ? (
|
||||||
<SuccessConfetti success={success} />
|
<SuccessConfetti success={success} action={<SuccessAction />} />
|
||||||
) : (
|
) : (
|
||||||
<Loader message={pricingStepText} />
|
<Loader message={pricingStepText} />
|
||||||
)}
|
)}
|
||||||
|
@ -84,7 +84,9 @@ export default function Pricing({ ddo }: { ddo: DDO }): ReactElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pricing succeeded
|
// 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}`)
|
Logger.log(`Transaction: ${tx}`)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
toast.error(error.message)
|
toast.error(error.message)
|
||||||
|
Loading…
Reference in New Issue
Block a user