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
09f43e01
Commit
09f43e01
authored
Feb 16, 2026
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the loading for the getFirekirin
parent
486ca67e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
44 deletions
+57
-44
AccountTab.tsx
...p/(dashboard)/(user)/(privateUser)/account/AccountTab.tsx
+1
-1
UserCoinCard.tsx
src/components/organism/Header/UserHeader/UserCoinCard.tsx
+7
-3
CredentialsCard.tsx
...shboard/userDashboard/gameCredentials/CredentialsCard.tsx
+2
-1
transaction.ts
src/services/transaction.ts
+45
-1
userApi.ts
src/services/userApi.ts
+2
-38
No files found.
src/app/(dashboard)/(user)/(privateUser)/account/AccountTab.tsx
View file @
09f43e01
...
@@ -6,7 +6,7 @@ import ResetPasswordForm from '@/components/pages/auth/resetPassword/ResetPasswo
...
@@ -6,7 +6,7 @@ import ResetPasswordForm from '@/components/pages/auth/resetPassword/ResetPasswo
import
EditUserProfile
from
'@/components/pages/dashboard/userDashboard/account/profile/editProfile'
;
import
EditUserProfile
from
'@/components/pages/dashboard/userDashboard/account/profile/editProfile'
;
import
EditUserWallet
from
'@/components/pages/dashboard/userDashboard/account/profile/editUserWallet'
;
import
EditUserWallet
from
'@/components/pages/dashboard/userDashboard/account/profile/editUserWallet'
;
import
{
useAppSelector
}
from
'@/hooks/hook'
;
import
{
useAppSelector
}
from
'@/hooks/hook'
;
import
{
useGetUserGameBalanceQuery
}
from
'@/services/
userApi
'
;
import
{
useGetUserGameBalanceQuery
}
from
'@/services/
transaction
'
;
import
React
from
'react'
;
import
React
from
'react'
;
type
profileTabProps
=
"account_detail"
|
"wallet_information"
|
"change_password"
type
profileTabProps
=
"account_detail"
|
"wallet_information"
|
"change_password"
...
...
src/components/organism/Header/UserHeader/UserCoinCard.tsx
View file @
09f43e01
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
{
useAppSelector
}
from
'@/hooks/hook'
import
{
useAppSelector
}
from
'@/hooks/hook'
import
GoldCoinIcon
from
'@/icons/GoldCoinIcon'
import
GoldCoinIcon
from
'@/icons/GoldCoinIcon'
import
SilverCoinIcon
from
'@/icons/SilverCoinIcon'
import
SilverCoinIcon
from
'@/icons/SilverCoinIcon'
import
{
useGetUserBalanceQuery
}
from
'@/services/
userApi
'
import
{
useGetUserBalanceQuery
}
from
'@/services/
transaction
'
import
{
UserBalance
}
from
'@/types/user'
import
{
UserBalance
}
from
'@/types/user'
import
{
Box
,
ClickAwayListener
,
Fade
,
IconButton
,
Paper
,
Popper
}
from
'@mui/material'
import
{
Box
,
ClickAwayListener
,
Fade
,
IconButton
,
Paper
,
Popper
}
from
'@mui/material'
import
{
CloseCircle
,
Refresh
}
from
'@wandersonalwes/iconsax-react'
import
{
CloseCircle
,
Refresh
}
from
'@wandersonalwes/iconsax-react'
...
@@ -43,7 +43,9 @@ export default function UserCoinCard() {
...
@@ -43,7 +43,9 @@ export default function UserCoinCard() {
>
>
<
GoldCoinIcon
/>
<
GoldCoinIcon
/>
<
div
className=
"coins"
>
<
div
className=
"coins"
>
<
strong
className=
"text-[12px] leading-4 font-[600] text-[#FBA027] block"
>
{
newBalance
?.
gcBalnce
||
0
}
</
strong
>
{
isLoading
||
isFetching
?
<
IconButton
>
<
Refresh
size=
{
10
}
className=
{
isLoading
||
isFetching
?
'animate-spin'
:
''
}
/>
</
IconButton
>
:
<
strong
className=
"text-[12px] leading-4 font-[600] text-[#FBA027] block"
>
{
newBalance
?.
gcBalnce
||
0
}
</
strong
>
}
<
span
className=
"text-[9px] mt-[-2px] hidden md:block"
>
Gold Coins
</
span
>
<
span
className=
"text-[9px] mt-[-2px] hidden md:block"
>
Gold Coins
</
span
>
</
div
>
</
div
>
</
Box
>
</
Box
>
...
@@ -102,7 +104,9 @@ export default function UserCoinCard() {
...
@@ -102,7 +104,9 @@ export default function UserCoinCard() {
>
>
<
SilverCoinIcon
/>
<
SilverCoinIcon
/>
<
div
className=
"coins"
>
<
div
className=
"coins"
>
<
strong
className=
"text-[12px] leading-4 font-[600] text-[#93E0D8] block"
>
{
sweepsCoin
.
providers
.
length
?
sweepsCoin
.
providers
.
reduce
((
acc
,
item
)
=>
acc
+
Number
(
item
.
balance
),
0
).
toFixed
(
2
)
:
0
}
</
strong
>
{
isLoading
||
isFetching
?
<
IconButton
>
<
Refresh
size=
{
10
}
className=
{
isLoading
||
isFetching
?
'animate-spin'
:
''
}
/>
</
IconButton
>
:
<
strong
className=
"text-[12px] leading-4 font-[600] text-[#93E0D8] block"
>
{
sweepsCoin
.
providers
.
length
?
sweepsCoin
.
providers
.
reduce
((
acc
,
item
)
=>
acc
+
Number
(
item
.
balance
),
0
).
toFixed
(
2
)
:
0
}
</
strong
>
}
<
span
className=
"text-[9px] mt-[-2px] hidden md:block"
>
Sweeps Coins
</
span
>
<
span
className=
"text-[9px] mt-[-2px] hidden md:block"
>
Sweeps Coins
</
span
>
</
div
>
</
div
>
</
Box
>
</
Box
>
...
...
src/components/pages/dashboard/userDashboard/gameCredentials/CredentialsCard.tsx
View file @
09f43e01
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
import
GlassWrapper
from
"@/components/molecules/GlassWrapper"
;
import
GlassWrapper
from
"@/components/molecules/GlassWrapper"
;
import
{
useAppDispatch
,
useAppSelector
}
from
"@/hooks/hook"
;
import
{
useAppDispatch
,
useAppSelector
}
from
"@/hooks/hook"
;
import
TapIcon
from
"@/icons/Tap"
;
import
TapIcon
from
"@/icons/Tap"
;
import
{
useChangeUserGamePasswordMutation
,
useGetUserBalanceBySlugQuery
}
from
"@/services/userApi"
;
import
{
useChangeUserGamePasswordMutation
}
from
"@/services/userApi"
;
import
{
openPasswordDialog
}
from
"@/slice/updatePasswordSlice"
;
import
{
openPasswordDialog
}
from
"@/slice/updatePasswordSlice"
;
import
{
CredentialsProps
}
from
"@/types/game"
;
import
{
CredentialsProps
}
from
"@/types/game"
;
import
{
CircularProgress
}
from
"@mui/material"
;
import
{
CircularProgress
}
from
"@mui/material"
;
...
@@ -16,6 +16,7 @@ import BalanceRefresh from "./BalanceRefresh";
...
@@ -16,6 +16,7 @@ import BalanceRefresh from "./BalanceRefresh";
import
{
CardPasswordField
}
from
"./CardPasswordHandler"
;
import
{
CardPasswordField
}
from
"./CardPasswordHandler"
;
import
CopyToClipboard
from
"./CopyToClipboard"
;
import
CopyToClipboard
from
"./CopyToClipboard"
;
import
ResetPasswordDialog
from
"./ResetPasswordDialog"
;
import
ResetPasswordDialog
from
"./ResetPasswordDialog"
;
import
{
useGetUserBalanceBySlugQuery
}
from
"@/services/transaction"
;
export
default
function
CredentialsCard
({
cred
}:
{
cred
:
CredentialsProps
})
{
export
default
function
CredentialsCard
({
cred
}:
{
cred
:
CredentialsProps
})
{
const
{
const
{
...
...
src/services/transaction.ts
View file @
09f43e01
import
{
TransactionStatusProps
}
from
"@/components/pages/dashboard/adminDashboard/transaction/TransactionTable"
;
import
{
TransactionStatusProps
}
from
"@/components/pages/dashboard/adminDashboard/transaction/TransactionTable"
;
import
{
setBalance
,
updateBalancePerProvider
}
from
"@/slice/userBalanceSlice"
;
import
{
GlobalResponse
,
QueryParams
}
from
"@/types/config"
;
import
{
GlobalResponse
,
QueryParams
}
from
"@/types/config"
;
import
{
DepositListProps
,
DepositProps
,
DepositResponseProps
,
MasspayPaymentFields
,
MasspayPaymentMethods
}
from
"@/types/transaction"
;
import
{
DepositListProps
,
DepositProps
,
DepositResponseProps
,
MasspayPaymentFields
,
MasspayPaymentMethods
}
from
"@/types/transaction"
;
import
{
UserBalanceResponse
}
from
"@/types/user"
;
import
{
createApi
}
from
"@reduxjs/toolkit/query/react"
;
import
{
createApi
}
from
"@reduxjs/toolkit/query/react"
;
import
{
baseQuery
}
from
"./baseQuery"
;
import
{
baseQuery
}
from
"./baseQuery"
;
import
{
SinlgePlayerResponseProps
}
from
"@/types/player"
;
// Define proper request/response types
// Define proper request/response types
interface
SubmitMassPayRequest
{
interface
SubmitMassPayRequest
{
...
@@ -31,6 +34,43 @@ export const transactionApi = createApi({
...
@@ -31,6 +34,43 @@ export const transactionApi = createApi({
baseQuery
:
baseQuery
,
baseQuery
:
baseQuery
,
tagTypes
:
[
"Deposit"
,
"Withdrawl"
],
tagTypes
:
[
"Deposit"
,
"Withdrawl"
],
endpoints
:
(
builder
)
=>
({
endpoints
:
(
builder
)
=>
({
getUserBalance
:
builder
.
query
<
UserBalanceResponse
,
void
>
({
query
:
()
=>
({
url
:
"/api/get-balance"
,
method
:
"GET"
,
}),
async
onQueryStarted
(
arg
,
{
dispatch
,
queryFulfilled
})
{
try
{
const
{
data
}
=
await
queryFulfilled
;
dispatch
(
setBalance
(
data
?.
data
));
}
catch
{
}
},
providesTags
:
[
'Deposit'
,
'Withdrawl'
]
}),
getUserBalanceBySlug
:
builder
.
query
<
{
data
:
{
provider
:
string
;
balance
:
number
,
flag
:
string
,
has_changed_password
:
boolean
}
},
{
slug
:
string
}
>
({
query
:
({
slug
})
=>
({
url
:
`/api/balance/
${
slug
}
`
,
method
:
"GET"
}),
async
onQueryStarted
(
arg
,
{
dispatch
,
queryFulfilled
})
{
try
{
const
{
data
}
=
await
queryFulfilled
;
dispatch
(
updateBalancePerProvider
({
balance
:
data
?.
data
.
balance
,
provider
:
arg
.
slug
}));
}
catch
{
}
},
providesTags
:
[
'Deposit'
,
'Withdrawl'
]
}),
getUserGameBalance
:
builder
.
query
<
SinlgePlayerResponseProps
,
void
>
({
query
:
()
=>
({
url
:
"/api/detail/get-balance"
,
method
:
"GET"
}),
providesTags
:
[
'Deposit'
,
'Withdrawl'
]
}),
deposit
:
builder
.
mutation
<
DepositResponseProps
,
DepositProps
>
({
deposit
:
builder
.
mutation
<
DepositResponseProps
,
DepositProps
>
({
query
:
({
id
,
amount
,
type
,
payment_token
})
=>
({
query
:
({
id
,
amount
,
type
,
payment_token
})
=>
({
url
:
`/api/payment/
${
id
}
`
,
url
:
`/api/payment/
${
id
}
`
,
...
@@ -134,5 +174,8 @@ export const {
...
@@ -134,5 +174,8 @@ export const {
useGetAllTransactionQuery
,
useGetAllTransactionQuery
,
useGetMassPayPaymentFieldsMutation
,
useGetMassPayPaymentFieldsMutation
,
useGetMassPayPaymentMethodsQuery
,
useGetMassPayPaymentMethodsQuery
,
useSubmitMassPayPaymentFieldsMutation
useSubmitMassPayPaymentFieldsMutation
,
useGetUserBalanceQuery
,
useGetUserBalanceBySlugQuery
,
useGetUserGameBalanceQuery
,
}
=
transactionApi
;
}
=
transactionApi
;
\ No newline at end of file
src/services/userApi.ts
View file @
09f43e01
import
{
setBalance
,
updateBalancePerProvider
}
from
"@/slice/userBalanceSlice"
;
import
{
GlobalResponse
}
from
"@/types/config"
;
import
{
GlobalResponse
}
from
"@/types/config"
;
import
{
CredentialsResponseProps
}
from
"@/types/game"
;
import
{
CredentialsResponseProps
}
from
"@/types/game"
;
import
{
SinlgePlayerResponseProps
,
WalletProps
}
from
"@/types/player"
;
import
{
SinlgePlayerResponseProps
,
WalletProps
}
from
"@/types/player"
;
import
{
UserBalanceResponse
}
from
"@/types/user"
;
import
{
createApi
}
from
"@reduxjs/toolkit/query/react"
;
import
{
createApi
}
from
"@reduxjs/toolkit/query/react"
;
import
{
baseQuery
}
from
"./baseQuery"
;
import
{
baseQuery
}
from
"./baseQuery"
;
...
@@ -27,42 +25,8 @@ export const userApi = createApi({
...
@@ -27,42 +25,8 @@ export const userApi = createApi({
}),
}),
invalidatesTags
:
[
'user'
,
"wallet"
]
invalidatesTags
:
[
'user'
,
"wallet"
]
}),
}),
getUserBalance
:
builder
.
query
<
UserBalanceResponse
,
void
>
({
query
:
()
=>
({
url
:
"/api/get-balance"
,
method
:
"GET"
,
}),
async
onQueryStarted
(
arg
,
{
dispatch
,
queryFulfilled
})
{
try
{
const
{
data
}
=
await
queryFulfilled
;
dispatch
(
setBalance
(
data
?.
data
));
}
catch
{
}
},
providesTags
:
[
'user'
]
}),
getUserBalanceBySlug
:
builder
.
query
<
{
data
:
{
provider
:
string
;
balance
:
number
,
flag
:
string
,
has_changed_password
:
boolean
}
},
{
slug
:
string
}
>
({
query
:
({
slug
})
=>
({
url
:
`/api/balance/
${
slug
}
`
,
method
:
"GET"
}),
async
onQueryStarted
(
arg
,
{
dispatch
,
queryFulfilled
})
{
try
{
const
{
data
}
=
await
queryFulfilled
;
dispatch
(
updateBalancePerProvider
({
balance
:
data
?.
data
.
balance
,
provider
:
arg
.
slug
}));
}
catch
{
}
},
providesTags
:
[
'user'
]
}),
getUserGameBalance
:
builder
.
query
<
SinlgePlayerResponseProps
,
void
>
({
query
:
()
=>
({
url
:
"/api/detail/get-balance"
,
method
:
"GET"
}),
providesTags
:
[
'user'
]
}),
getUserGameCredentials
:
builder
.
query
<
CredentialsResponseProps
,
void
>
({
getUserGameCredentials
:
builder
.
query
<
CredentialsResponseProps
,
void
>
({
query
:
()
=>
({
query
:
()
=>
({
url
:
`/api/credentials`
,
url
:
`/api/credentials`
,
...
@@ -103,4 +67,4 @@ export const userApi = createApi({
...
@@ -103,4 +67,4 @@ export const userApi = createApi({
})
})
export
const
{
useAddUserWalletMutation
,
useUpdateUserProfileMutation
,
useGetUserBalanceQuery
,
useGetUserBalanceBySlugQuery
,
useGetUserGameBalanceQuery
,
useGetUserGameCredentialsQuery
,
useChangeUserGamePasswordMutation
,
useUpdateUserGamePasswordMutation
,
useGetGamesPasswordStatusQuery
}
=
userApi
;
export
const
{
useAddUserWalletMutation
,
useUpdateUserProfileMutation
,
useGetUserGameCredentialsQuery
,
useChangeUserGamePasswordMutation
,
useUpdateUserGamePasswordMutation
,
useGetGamesPasswordStatusQuery
}
=
userApi
;
\ No newline at end of file
\ No newline at end of file
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