import type { ReactNode } from 'react'; import { type Chain, base } from 'viem/chains'; import { useChainId } from 'wagmi'; import { baseSvg } from '../../../internal/svg/baseSvg'; import { cn, text } from '../../../styles/theme'; type NFTNetworkProps = { className?: string; label?: ReactNode; }; const networkMap = { 8453: { chain: base, icon: baseSvg, }, } as Record; export function NFTNetwork({ className, label = 'Network' }: NFTNetworkProps) { const chainId = useChainId(); if (!chainId || !networkMap[chainId]) { return null; } const { chain, icon } = networkMap[chainId]; return (
{label}
{icon}
{chain.name}
); }