UI Components
Last updated
Last updated
Displays pot information like Current Pot Size, Total Pot Size in ETH for the current pot.
Displays ongoing activities like tickets generated, wallet address, and the timestamp.
Render the Leaderboard
component with an optional prop to display the top 3 ranking users.
user:
The address of the user.
Render the CurrentTickets
component with a required prop to display the tickets that the user holds
user:
The address of the user.
Render the PastTickets
component with a required prop to display the past tickets that the user holds
user:
The address of the user.
Use it to check the results of the raffle draw and claim a prize if the user has a winning ticket.
You can also use the tabs in thePastTickets
component to claim the prize of the winning ticket.
Configure modal for checking the results of a raffle draw in your react app and also claim the prize.
trigger
A react node that will be presented to the user, usually a button or something clickable.
Y
user
Wallet address of the user .
Y
potId
ID of the pot that has drawn the raffle.
Y
openState
N
onClaimComplete
Triggered when the prize was claimed successfully.
N
onClaimError
Triggered when the calling the claim function resulted in an error, returns the error and the claim data.
N
onClose
Triggered when the modal was closed. Returns some useful data about the results as well as the step data and the current step.
N
This is a state tuple from react's , you can use this to programmatically open or close the modal. The modal will use this state when determining if the modal is open or closed.