Commit 69939eb8 by Arjun Jhukal

updated the new major changes

parent 2a3759e1
......@@ -15,16 +15,16 @@ export default function CoinCalculator({ slug }: { slug: string }) {
const router = useRouter();
const calculateBonus = (amount: number) => {
return Math.max(Math.round(25.56 * amount - 27.78), 0);
};
// const calculateBonus = (amount: number) => {
// return Math.max(Math.round(25.56 * amount - 27.78), 0);
// };
const handleCalculate = () => {
if (amount && amount > 0) {
const base = amount * 10;
const bonus = calculateBonus(amount);
// const bonus = calculateBonus(amount);
setBaseCoins(base);
setBonusCoins(bonus);
// setBonusCoins(bonus);
} else {
setBaseCoins(null);
setBonusCoins(null);
......@@ -39,7 +39,7 @@ export default function CoinCalculator({ slug }: { slug: string }) {
const handleBuy = () => {
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 }) {
{!cred.is_iframe ? (
<Link
href="#"
href={cred?.game_url}
className="ss-btn bg-secondary-grad flex justify-center items-center text-[#426A66] gap-2"
target="_blank"
>
<TapIcon />
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