Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcramer committed Jul 30, 2024
1 parent 692da6d commit 34c5f77
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/wallet/components/WalletDropdownBaseName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,18 @@ import type { WalletDropdownBaseNameReact } from '../types';
export function WalletDropdownBaseName({
className,
}: WalletDropdownBaseNameReact) {
const account = useAccount();
const { address } = useAccount();

if (!address) {
return null;
}

const { data: baseName, isLoading } = useName({
address: account.address as `0x${string}`,
address,
chain: base,
});

let hasBaseUserName = false;

if (baseName) {
hasBaseUserName = true;
}

const hasBaseUserName = !!baseName;
const title = hasBaseUserName ? 'Go to profile' : 'Claim a Basename';
const href = hasBaseUserName
? `https://www.base.org/name/${baseName}`
Expand All @@ -46,7 +45,11 @@ export function WalletDropdownBaseName({
<>
<span className={cn(text.body, 'shrink-0')}>{title}</span>
{!hasBaseUserName && (
<span className="ml-2 rounded-full bg-[#E0E7FF] px-2 text-center font-bold font-inter text-[#4F46E5] text-[0.6875rem] uppercase leading-6">
<span
className={cn(
'ml-2 rounded-full bg-[#E0E7FF] px-2 text-center font-bold font-inter text-[#4F46E5] text-[0.6875rem] uppercase leading-6',
)}
>
NEW
</span>
)}
Expand Down

0 comments on commit 34c5f77

Please sign in to comment.