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
3557cd9c
Commit
3557cd9c
authored
Oct 16, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the fix for refresh balance
parent
07735494
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
12 deletions
+53
-12
BalanceRefresh.tsx
...ashboard/userDashboard/gameCredentials/BalanceRefresh.tsx
+48
-8
CredentialsCard.tsx
...shboard/userDashboard/gameCredentials/CredentialsCard.tsx
+0
-0
index.tsx
...s/pages/dashboard/userDashboard/gameCredentials/index.tsx
+5
-4
No files found.
src/components/pages/dashboard/userDashboard/gameCredentials/BalanceRefresh.tsx
View file @
3557cd9c
"use client"
//
"use client"
import
{
Refresh
}
from
'@wandersonalwes/iconsax-react'
import
React
from
'react'
//
import { Refresh } from '@wandersonalwes/iconsax-react'
//
import React from 'react'
export
default
function
BalanceRefresh
({
label
,
icon
,
onClick
}:
{
label
:
string
;
icon
:
boolean
;
onClick
?:
()
=>
void
})
{
// export default function BalanceRefresh({ label, icon, onClick }: { label: string; icon: boolean; onClick?: () => void }) {
// return (
// <p className='text-[10px] lg:text-[12px] leading-[120%] font-[500] bg-primary-grad py-1 px-2 rounded-[12px] flex items-center gap-1 max-w-fit cursor-pointer' onClick={onClick} >
// {icon ? <Refresh size={12} /> : ""}
// {label || ""}
// </p>
// )
// }
"use client"
;
import
{
Refresh
}
from
"@wandersonalwes/iconsax-react"
;
import
React
from
"react"
;
import
{
CircularProgress
}
from
"@mui/material"
;
export
default
function
BalanceRefresh
({
label
,
icon
,
onClick
,
loading
=
false
,
}:
{
label
:
string
;
icon
:
boolean
;
onClick
?:
()
=>
void
;
loading
?:
boolean
;
})
{
return
(
<
p
className=
'text-[10px] lg:text-[12px] leading-[120%] font-[500] bg-primary-grad py-1 px-2 rounded-[12px] flex items-center gap-1 max-w-fit cursor-pointer'
onClick=
{
()
=>
window
.
location
.
reload
()
}
>
{
icon
?
<
Refresh
size=
{
12
}
/>
:
""
}
{
label
||
""
}
<
p
className=
{
`text-[10px] lg:text-[12px] leading-[120%] font-[500] py-1 px-2 rounded-[12px] flex items-center gap-1 max-w-fit cursor-pointer transition-all duration-200 ${loading
? "bg-gray-500/50 text-gray-200 cursor-not-allowed"
: "bg-primary-grad text-white"
}`
}
onClick=
{
!
loading
?
onClick
:
undefined
}
>
{
loading
?
(
<>
<
CircularProgress
size=
{
10
}
thickness=
{
5
}
color=
"inherit"
/>
Refreshing...
</>
)
:
(
<>
{
icon
&&
<
Refresh
size=
{
12
}
/>
}
{
label
}
</>
)
}
</
p
>
)
)
;
}
src/components/pages/dashboard/userDashboard/gameCredentials/CredentialsCard.tsx
View file @
3557cd9c
This diff is collapsed.
Click to expand it.
src/components/pages/dashboard/userDashboard/gameCredentials/index.tsx
View file @
3557cd9c
...
...
@@ -44,8 +44,9 @@ function CredentialsCardShimmer() {
export
default
function
GameCredentialsPage
()
{
const
{
data
:
creds
,
isLoading
:
loadingCreds
}
=
useGetUserGameCredentialsQuery
();
const
{
data
:
balance
,
isLoading
:
loadingBalance
}
=
useGetUserGameBalanceQuery
();
console
.
log
(
"creds"
,
creds
);
console
.
log
(
"balance"
,
balance
);
// console.log("creds", creds);
// console.log("balance", balance);
return
(
<
section
className=
"credentials__listing "
>
<
div
className=
"section__title mb-8 lg:max-w-[521px]"
>
...
...
@@ -63,8 +64,8 @@ export default function GameCredentialsPage() {
<
div
className=
"col-span-1"
key=
{
cred
.
full_name
}
>
<
CredentialsCard
cred=
{
cred
}
balance=
{
balance
}
balanceLoading=
{
loadingBalance
}
//
balance=
{
balance
}
//
balanceLoading=
{
loadingBalance
}
/>
</
div
>
))
...
...
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