bingo-prepurchasemodal v0.1.5
About
Prepurchase Modal for Play Bingo
Installing
npm i bingo-prepurchasemodal
How to use
import prePurchaseModal from 'bingo-prepurchasemodal'
prePurchaseModal(visibility, functionForClosing, balance, jsessionid );
Parameter details
visibility ==> boolean (True or False) , dictates the display of the modal if visible or not
functionForClosing ==> a function that will set the visibility to false, this is used when a submit button or close button is clicked inside the modal (visibility needs to be false)
balance ===> is an object that is consists of properties such as cash,bonus, and balance. these data are displayed on the header/title of the modal
jsesssionid ===> p6 jssessionid used for API access
Sample code
import prePurchaseModal from 'bingo-prepurchasemodal'
const balance = { cash: 500.25, bonus: 500.25, balance: 500.25, };
const handleClose = () => { //insert code setting visiblity to false };
prePurchaseModal(true, handleClose, balance, '6F421A8E5EBC62D65AA8970CD0EFDF44' );
Reminders
When the modal is launched, you need to click "My Prepurchases" button to display the data on the table.
You might need to add this on your package.json to access the API locally (CORS issue)
"proxy": "https://p6.dev.parlaygames.net/site-api/v2/bingo/",