Commit 69939eb8 by Arjun Jhukal

updated the new major changes

parent 2a3759e1
...@@ -15,16 +15,16 @@ export default function CoinCalculator({ slug }: { slug: string }) { ...@@ -15,16 +15,16 @@ export default function CoinCalculator({ slug }: { slug: string }) {
const router = useRouter(); const router = useRouter();
const calculateBonus = (amount: number) => { // const calculateBonus = (amount: number) => {
return Math.max(Math.round(25.56 * amount - 27.78), 0); // return Math.max(Math.round(25.56 * amount - 27.78), 0);
}; // };
const handleCalculate = () => { const handleCalculate = () => {
if (amount && amount > 0) { if (amount && amount > 0) {
const base = amount * 10; const base = amount * 10;
const bonus = calculateBonus(amount); // const bonus = calculateBonus(amount);
setBaseCoins(base); setBaseCoins(base);
setBonusCoins(bonus); // setBonusCoins(bonus);
} else { } else {
setBaseCoins(null); setBaseCoins(null);
setBonusCoins(null); setBonusCoins(null);
...@@ -39,7 +39,7 @@ export default function CoinCalculator({ slug }: { slug: string }) { ...@@ -39,7 +39,7 @@ export default function CoinCalculator({ slug }: { slug: string }) {
const handleBuy = () => { const handleBuy = () => {
if (baseCoins !== null && bonusCoins !== null) { if (baseCoins !== null && bonusCoins !== null) {
router.push(`/buy-coins/${slug}/checkout?amount=${amount}&bonus=${bonusCoins}`); router.push(`/buy-coins/${slug}/checkout?amount=${amount}&bonus=${amount}`);
} }
}; };
......
...@@ -113,8 +113,9 @@ export default function CredentialsCard({ cred }: { cred: CredentialsProps }) { ...@@ -113,8 +113,9 @@ export default function CredentialsCard({ cred }: { cred: CredentialsProps }) {
{!cred.is_iframe ? ( {!cred.is_iframe ? (
<Link <Link
href="#" href={cred?.game_url}
className="ss-btn bg-secondary-grad flex justify-center items-center text-[#426A66] gap-2" className="ss-btn bg-secondary-grad flex justify-center items-center text-[#426A66] gap-2"
target="_blank"
> >
<TapIcon /> <TapIcon />
Play Game Play Game
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment