Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 81707c7bd8 | |||
| e5b36e3f45 | |||
| 6f2fc17090 |
@@ -121,4 +121,7 @@ REACT_APP_SHOW_SLIDER_BANNERS=0
|
|||||||
REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com'
|
REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com'
|
||||||
|
|
||||||
# FOR FAMILY GAME LINK
|
# FOR FAMILY GAME LINK
|
||||||
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
||||||
|
|
||||||
|
# REACT APP CUSTOMTIMER
|
||||||
|
REACT_APP_CUSTOMTIMER=90
|
||||||
+4
-1
@@ -89,4 +89,7 @@ REACT_APP_SHOW_SLIDER_BANNERS=0
|
|||||||
REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com'
|
REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com'
|
||||||
|
|
||||||
# FOR FAMILY GAME LINK
|
# FOR FAMILY GAME LINK
|
||||||
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
||||||
|
|
||||||
|
# REACT APP CUSTOMTIMER
|
||||||
|
REACT_APP_CUSTOMTIMER=90
|
||||||
+4
-1
@@ -95,4 +95,7 @@ REACT_APP_SHOW_SLIDER_BANNERS=0
|
|||||||
REACT_APP_MEDIA_LINK='https://media.wrenchboard.com'
|
REACT_APP_MEDIA_LINK='https://media.wrenchboard.com'
|
||||||
|
|
||||||
# FOR FAMILY GAME LINK
|
# FOR FAMILY GAME LINK
|
||||||
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
||||||
|
|
||||||
|
# REACT APP CUSTOMTIMER
|
||||||
|
REACT_APP_CUSTOMTIMER=90
|
||||||
@@ -49,7 +49,7 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center">
|
<div className="w-full flex justify-center items-center">
|
||||||
<h1 className="text-xl font-semibold text-dark-gray dark:text-white tracking-tighter my-1">
|
<h1 className="text-xl font-semibold text-dark-gray dark:text-white tracking-tighter my-1">
|
||||||
{isSuccess
|
{isSuccess
|
||||||
? "Credit was Successful!"
|
? "Credit was Successful!"
|
||||||
@@ -59,41 +59,42 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
|||||||
|
|
||||||
{data?.internal_return >= 0 &&
|
{data?.internal_return >= 0 &&
|
||||||
data?.result !== "Charge failed" && (
|
data?.result !== "Charge failed" && (
|
||||||
<>
|
<div className="w-full md:w-[60%] mx-auto">
|
||||||
<div className="flex items-center gap-8">
|
<div className="grid grid-cols-2 gap-8 my-2">
|
||||||
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
|
<h1 className="job-label">
|
||||||
Amount({data?.currency || ""})
|
Amount({data?.currency || ""})
|
||||||
</h1>
|
</h1>
|
||||||
<span className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
|
<span className="w-full text-base text-dark-gray dark:text-white tracking-tighter flex justify-end items-end">
|
||||||
{`${data?.symbol || ""} ${
|
{`${data?.symbol || ""} ${
|
||||||
Number(data?.amount * 0.01).toLocaleString() || ""
|
Number(data?.amount * 0.01).toFixed(2) || ""
|
||||||
}`}
|
}`}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{data?.curr_balance &&
|
{data?.curr_balance &&
|
||||||
<div className="flex items-center gap-8">
|
<div className="grid grid-cols-2 gap-8 my-2">
|
||||||
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
|
<h1 className="job-label">
|
||||||
Wallet Balance
|
Wallet Balance
|
||||||
</h1>
|
</h1>
|
||||||
<span className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
|
<span className="w-full text-base text-dark-gray dark:text-white tracking-tighter flex justify-end items-end">
|
||||||
{data?.curr_balance * 0.01}
|
{(data?.curr_balance * 0.01).toFixed(2)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
{isSuccess && (
|
{isSuccess && (
|
||||||
<div className="flex items-center gap-8">
|
<div className="grid grid-cols-2 gap-8 my-2">
|
||||||
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
|
<h1 className="job-label">
|
||||||
Confirmation Number
|
Confirmation Number
|
||||||
</h1>
|
</h1>
|
||||||
<span className="text-xl font-bold text-dark-gray dark:text-white tracking-tighter my-1">
|
<span className="w-full text-base text-dark-gray dark:text-white tracking-tighter flex justify-end items-end">
|
||||||
{data?.confirmation}
|
{data?.confirmation}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</>
|
</div>
|
||||||
)}
|
)
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import LoadingSpinner from "../../Spinners/LoadingSpinner";
|
|||||||
import AddFundPop from "./AddFundPop";
|
import AddFundPop from "./AddFundPop";
|
||||||
import CompleteConfirmCredit from "./CompleteConfirmCredit";
|
import CompleteConfirmCredit from "./CompleteConfirmCredit";
|
||||||
import ConfirmAddFund from "./ConfirmAddFund";
|
import ConfirmAddFund from "./ConfirmAddFund";
|
||||||
|
import CustomTimer from "../../countdown/CustomTimer";
|
||||||
|
|
||||||
const CreditPopup = ({ details, onClose, situation, walletItem }) => {
|
const CreditPopup = ({ details, onClose, situation, walletItem }) => {
|
||||||
const [input, setInput] = useState("");
|
const [input, setInput] = useState("");
|
||||||
@@ -75,7 +76,8 @@ const CreditPopup = ({ details, onClose, situation, walletItem }) => {
|
|||||||
<p className="text-lg md:text-2xl text-emerald-600 tracking-wide font-bold">Processing payment</p>
|
<p className="text-lg md:text-2xl text-emerald-600 tracking-wide font-bold">Processing payment</p>
|
||||||
<p className="text-lg md:text-2xl text-emerald-600 tracking-wide font-bold">Please do not refresh</p>
|
<p className="text-lg md:text-2xl text-emerald-600 tracking-wide font-bold">Please do not refresh</p>
|
||||||
<LoadingSpinner size="6" color="sky-blue" height='h-20' />
|
<LoadingSpinner size="6" color="sky-blue" height='h-20' />
|
||||||
<p className="text-lg md:text-2xl text-emerald-600 tracking-wide font-bold">Timer countdown</p>
|
{/* <p className="text-lg md:text-2xl text-emerald-600 tracking-wide font-bold">Timer countdown</p> */}
|
||||||
|
<CustomTimer className="text-lg text-center md:text-2xl text-emerald-600 tracking-wide font-bold" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import React, { useEffect, useState } from 'react'
|
||||||
|
|
||||||
|
export default function CustomTimer({className='text-emerald-500'}) {
|
||||||
|
|
||||||
|
const [time, setTime] = useState(Number(process.env.REACT_APP_CUSTOMTIMER))
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
const timer = setInterval(()=>{
|
||||||
|
setTime(prev => prev - 1)
|
||||||
|
},1000)
|
||||||
|
return ()=>{
|
||||||
|
clearInterval(timer)
|
||||||
|
}
|
||||||
|
},[])
|
||||||
|
|
||||||
|
let minutes = time == 0 ? 0 : Math.floor(time/60)
|
||||||
|
let seconds = time == 0 ? 0 :time - (minutes * 60)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<p className={`w-full text-base text-emerald-500 ${className}`}>
|
||||||
|
{`${minutes > 9 ? minutes : '0'+minutes} : ${seconds > 9 ? seconds : '0'+seconds}`}
|
||||||
|
</p>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user