chore: show delegation flag for non-anonymous sessions

This commit is contained in:
Danish Arora 2025-10-30 13:50:57 +05:30
parent 10adec1437
commit 14aa6d43aa
No known key found for this signature in database
GPG Key ID: 1C6EF37CDAE1426E

View File

@ -190,33 +190,35 @@ const Header = () => {
{/* User Status & Actions */} {/* User Status & Actions */}
{isConnected || currentUser?.verificationStatus === EVerificationStatus.ANONYMOUS ? ( {isConnected || currentUser?.verificationStatus === EVerificationStatus.ANONYMOUS ? (
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
{/* Status Badge */} {/* Status Badge - hidden for anonymous sessions */}
<Badge {currentUser?.verificationStatus !== EVerificationStatus.ANONYMOUS && (
variant="outline" <Badge
className={`font-mono text-xs border-0 ${ variant="outline"
currentUser?.verificationStatus === className={`font-mono text-xs border-0 ${
EVerificationStatus.ENS_VERIFIED && currentUser?.verificationStatus ===
delegationInfo?.isValid EVerificationStatus.ENS_VERIFIED &&
? 'bg-green-500/20 text-green-400 border-green-500/30' delegationInfo?.isValid
: currentUser?.verificationStatus === ? 'bg-green-500/20 text-green-400 border-green-500/30'
EVerificationStatus.ENS_VERIFIED
? 'bg-orange-500/20 text-orange-400 border-orange-500/30'
: 'bg-yellow-500/20 text-yellow-400 border-yellow-500/30'
}`}
>
{getStatusIcon()}
<span className="ml-1">
{currentUser?.verificationStatus ===
EVerificationStatus.WALLET_UNCONNECTED
? 'CONNECT'
: delegationInfo?.isValid
? 'READY'
: currentUser?.verificationStatus === : currentUser?.verificationStatus ===
EVerificationStatus.ENS_VERIFIED EVerificationStatus.ENS_VERIFIED
? 'EXPIRED' ? 'bg-orange-500/20 text-orange-400 border-orange-500/30'
: 'DELEGATE'} : 'bg-yellow-500/20 text-yellow-400 border-yellow-500/30'
</span> }`}
</Badge> >
{getStatusIcon()}
<span className="ml-1">
{currentUser?.verificationStatus ===
EVerificationStatus.WALLET_UNCONNECTED
? 'CONNECT'
: delegationInfo?.isValid
? 'READY'
: currentUser?.verificationStatus ===
EVerificationStatus.ENS_VERIFIED
? 'EXPIRED'
: 'DELEGATE'}
</span>
</Badge>
)}
{/* User Dropdown */} {/* User Dropdown */}
<DropdownMenu> <DropdownMenu>