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
713efd52
Commit
713efd52
authored
Oct 16, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the copy password functionality to the credential card
parent
b506f86a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
87 deletions
+2
-87
CardPasswordHandler.tsx
...ard/userDashboard/gameCredentials/CardPasswordHandler.tsx
+2
-0
CredentialsCard.tsx
...shboard/userDashboard/gameCredentials/CredentialsCard.tsx
+0
-87
No files found.
src/components/pages/dashboard/userDashboard/gameCredentials/CardPasswordHandler.tsx
View file @
713efd52
...
...
@@ -4,6 +4,7 @@ import React from 'react'
import
BalanceRefresh
from
'./BalanceRefresh'
;
import
{
Eye
,
EyeSlash
}
from
'@wandersonalwes/iconsax-react'
;
import
{
Tooltip
}
from
'@mui/material'
;
import
CopyToClipboard
from
'./CopyToClipboard'
;
export
const
CardPasswordField
=
({
password
}:
{
password
:
string
})
=>
{
...
...
@@ -23,6 +24,7 @@ export const CardPasswordField = ({ password }: { password: string }) => {
</
Tooltip
>
<
div
className=
"flex justify-end items-center gap-2"
>
{
showPassword
?
<
CopyToClipboard
text=
{
password
}
/>
:
""
}
<
p
className=
'cursor-pointer'
onClick=
{
()
=>
{
setShowPassword
(
prev
=>
!
prev
)
}
}
>
...
...
src/components/pages/dashboard/userDashboard/gameCredentials/CredentialsCard.tsx
View file @
713efd52
// import { Box, Button, CircularProgress } from '@mui/material'
// import Image from 'next/image'
// import React from 'react'
// import BalanceRefresh from './BalanceRefresh'
// import { Coin, Copy } from '@wandersonalwes/iconsax-react'
// import Link from 'next/link'
// import TapIcon from '@/icons/Tap'
// import { CredentialsProps } from '@/types/game'
// import { CardPasswordField } from './CardPasswordHandler'
// import CopyToClipboard from './CopyToClipboard'
// import GameIframeDialog from '../games/exclusiveGames/exclusiveGameDetail/GameIframeDialog'
// import GlassWrapper from '@/components/molecules/GlassWrapper'
// import { b } from 'framer-motion/client'
// import { useGetUserBalanceBySlugQuery } from '@/services/userApi'
// export default function CredentialsCard({ cred, balance, balanceLoading }: { cred: CredentialsProps; balance: any, balanceLoading?: boolean }) {
// const { data, isLoading } = useGetUserBalanceBySlugQuery({ slug: cred.name }, { skip: !cred.name });
// console.log("data", data?.data);
// const currentBalance = balance?.data?.game_information?.[cred.name] || null;
// const scValue =
// currentBalance?.type === "sc" ? currentBalance.balance ?? 0 : null;
// const gcValue =
// currentBalance?.type === "gc" ? currentBalance.balance ?? 0 : null;
// return (
// <GlassWrapper className="p-4 lg:p-6">
// <div className="credentials__header flex gap-2">
// <Image src={cred?.logo || "/assets/images/fallback.png"} alt={cred?.full_name} className='rounded-full aspect-square' width={74} height={74} />
// <div className="game__detail">
// <strong className='block text-[16px] text-white'>{cred.full_name}</strong>
// {balanceLoading ? <div className='flex items-center gap-2 mb-2'>
// <CircularProgress
// size={10}
// thickness={5}
// color='inherit'
// />
// <span className='text-gray-400 text-[10px]'>
// Updating balance...
// </span>
// </div> : <p className="text-[14px] my-[6px] uppercase">
// {currentBalance?.type === "sc" && `sc: ${scValue ?? "N/A"}`}
// {currentBalance?.type === "gc" && `gc: ${gcValue ?? "N/A"}`}
// </p>}
// <BalanceRefresh label='Refresh Balance' icon={true} />
// </div>
// </div>
// <ul className='mt-4'>
// <li className='py-2 border-t border-b border-[rgba(255,255,255,0.2)] grid grid-cols-2'>
// <span className='text-[12px] leading-[120%] font-[600]'>Entries :</span>
// <span className='text-[11px]'>{cred.entries || "N/A"}</span>
// </li>
// <li className='py-2 border-b border-[rgba(255,255,255,0.2)] grid grid-cols-2'>
// <span className='text-[12px] leading-[120%] font-[600]'>Username :</span>
// <div className="flex justify-between items-center">
// <span className='text-[11px]'>{cred?.credentials.username || "N/A"}</span>
// {cred.credentials.username && <CopyToClipboard text={cred.credentials.username} />}
// </div>
// </li>
// <li className='py-2 border-b border-[rgba(255,255,255,0.2)] grid grid-cols-2'>
// <span className='text-[12px] leading-[120%] font-[600]'>Password :</span>
// <CardPasswordField password={cred?.credentials.password} />
// </li>
// </ul>
// <div className="action__group mt-4 flex flex-col md:flex-row justify-between gap-2 md:gap-4">
// <Link href={`/buy-coins/${cred?.id}`} className='ss-btn bg-primary-grad flex justify-center items-center gap-1'><Coin />Buy Coins</Link>
// {
// !cred.is_iframe ? (
// <Link href={"#"} className='ss-btn bg-secondary-grad flex justify-center items-center text-[#426A66] gap-2 '>
// <TapIcon />
// Play Game
// </Link>
// ) : <GameIframeDialog
// gameName={cred?.full_name}
// gameUrl={cred?.game_url || ""}
// isCredCard={true}
// />
// }
// </div>
// </GlassWrapper>
// )
// }
"use client"
;
import
{
Box
,
Button
,
CircularProgress
}
from
"@mui/material"
;
...
...
@@ -101,7 +15,6 @@ import GlassWrapper from "@/components/molecules/GlassWrapper";
import
{
useGetUserBalanceBySlugQuery
}
from
"@/services/userApi"
;
export
default
function
CredentialsCard
({
cred
}:
{
cred
:
CredentialsProps
})
{
// Fetch live balance for this game using its provider slug (e.g. 'easystreet', 'goldcoincity', etc.)
const
{
data
:
balanceData
,
isLoading
:
balanceLoading
,
...
...
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