+
+
+ {sats.toLocaleString()}
+
+
+ {count} zap{count === 1 ? '' : 's'}
+
+
+ );
+}
+
+function TargetRow({
+ rank,
+ target,
+ spot,
+}: {
+ rank: number;
+ target: ZapLeaderboardTarget;
+ spot?: SkateSpot;
+}) {
+ // `a` coordinate = kind:pubkey:identifier (identifier may itself contain ':').
+ const [kindStr, pubkey, ...rest] = target.key.split(':');
+ const identifier = rest.join(':');
+ const kind = Number(kindStr);
+ const isSpotCoord = kind === SKATE_SPOT_KIND && !!pubkey && identifier !== '';
+ const isShop = spot?.types.includes('shop') ?? false;
+
+ const to = spot
+ ? isShop
+ ? `/shop/${spot.pubkey}/${spot.identifier}`
+ : `/spot/${spot.pubkey}/${spot.identifier}`
+ : isSpotCoord
+ ? `/${nip19.naddrEncode({ kind, pubkey, identifier })}`
+ : undefined;
+
+ const label = spot?.title ?? (isShop ? 'Skate shop' : 'Skate spot');
+
+ const inner = (
+