Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sweepstake
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arjun Jhukal
sweepstake
Commits
69939eb8
Commit
69939eb8
authored
Oct 18, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the new major changes
parent
2a3759e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
CoinCalculator.tsx
...erDashboard/buyCoins/buyCoinSinlgeGame/CoinCalculator.tsx
+6
-6
CredentialsCard.tsx
...shboard/userDashboard/gameCredentials/CredentialsCard.tsx
+2
-1
No files found.
src/components/pages/dashboard/userDashboard/buyCoins/buyCoinSinlgeGame/CoinCalculator.tsx
View file @
69939eb8
...
...
@@ -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
}
`
);
}
};
...
...
src/components/pages/dashboard/userDashboard/gameCredentials/CredentialsCard.tsx
View file @
69939eb8
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment