Commit 7f758c97 by Arjun Jhukal

udpated the credentials value based on type sc or gc

parent f75f34c4
......@@ -12,7 +12,7 @@ export default function PrimaryMenu() {
return (
<List>
{data ? data?.data?.map((menu: any) => (
<ListItem key={menu.name}>
<ListItem key={menu?.name}>
{/* <ListItemButton component="a" href={menu.slug ? `/general/${menu.slug}` : "#"}>
<ListItemIcon>
<ReceiptEdit size={18} />
......@@ -23,7 +23,7 @@ export default function PrimaryMenu() {
<ListItemIcon>
<ReceiptEdit size={18} />
</ListItemIcon>
<ListItemText primary={menu.name} />
<ListItemText primary={menu?.name} />
</Link>
</ListItem>
))
......
......@@ -15,6 +15,8 @@ export default function CredentialsCard({ cred, balance }: { cred: CredentialsPr
const scValue =
currentBalance?.type === "sc" ? currentBalance.balance ?? 0 : null;
const gcValue =
currentBalance?.type === "gc" ? currentBalance.balance ?? 0 : null;
return (
<Box sx={{
borderRadius: "24px",
......@@ -25,7 +27,8 @@ export default function CredentialsCard({ cred, balance }: { cred: CredentialsPr
<div className="game__detail">
<strong className='block text-[16px] text-white'>{cred.full_name}</strong>
<p className="text-[14px] my-[6px] uppercase">
{currentBalance.type}: {scValue !== null ? scValue : "N/A"}
{currentBalance?.type === "sc" && `sc: ${scValue ?? "N/A"}`}
{currentBalance?.type === "gc" && `gc: ${gcValue ?? "N/A"}`}
</p>
<BalanceRefresh label='Refresh Balance' icon={true} />
......
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