Live video on the AT Protocol

clean up

+15 -28
+3 -3
js/components/src/components/chat/badge.tsx
··· 14 14 badgeType: string; 15 15 size?: number; 16 16 }) => { 17 - const source = 18 - BADGE_IMAGES[badgeType] ?? BADGE_IMAGES["place.stream.badge.defs#vip"]; 17 + const source = BADGE_IMAGES[badgeType]; 18 + if (!source) return null; 19 19 return ( 20 20 <Image 21 21 source={source} ··· 38 38 return ( 39 39 <> 40 40 {badges.map((badge, index) => ( 41 - <Badge key={`badge-${index}`} badgeType={badge.badgeType} /> 41 + <Badge key={index} badgeType={badge.badgeType} /> 42 42 ))} 43 43 </> 44 44 );
+12 -25
js/components/src/components/chat/user-profile-card.tsx
··· 27 27 interface BadgeMeta { 28 28 label: string; 29 29 description: string; 30 - issuedBy?: string; // Optional template for issuer display 30 + issuedBy?: string; 31 31 } 32 32 33 33 const BADGE_META: Record<string, BadgeMeta> = { ··· 76 76 badge: NonNullable<ChatMessageViewHydrated["badges"]>[number]; 77 77 serviceDid: string; 78 78 }) => { 79 - const { theme } = useTheme(); 80 79 const streamer = useLivestreamStore((x) => x.livestream?.author); 81 80 const isServiceIssued = badge.issuer === serviceDid; 82 81 const issuerDids = useMemo( ··· 93 92 : issuerProfiles[badge.issuer]?.handle 94 93 ? `@${issuerProfiles[badge.issuer].handle}` 95 94 : badge.issuer; 96 - console.log("meta", meta); 97 95 if (meta.issuedBy) { 98 - console.log("issued by"); 99 96 issuerLabel = meta.issuedBy 100 97 .replace("{issuer}", issuerLabel) 101 98 .replace( ··· 179 176 onHoverOut: () => setHovered(false), 180 177 } 181 178 : {})} 182 - style={ 183 - Platform.OS === "web" && hovered 184 - ? { 185 - backgroundColor: "rgba(255,255,255,0.15)", 186 - borderRadius: 6, 187 - paddingHorizontal: 3, 188 - flexDirection: "row", 189 - gap: 4, 190 - marginLeft: -3, 191 - paddingLeft: 3, 192 - marginRight: -2, 193 - } 194 - : { 195 - paddingHorizontal: 3, 196 - flexDirection: "row", 197 - gap: 4, 198 - marginLeft: -3, 199 - paddingLeft: 3, 200 - marginRight: -2, 201 - } 202 - } 179 + style={{ 180 + paddingHorizontal: 3, 181 + flexDirection: "row", 182 + gap: 4, 183 + marginLeft: -3, 184 + paddingLeft: 3, 185 + marginRight: -2, 186 + ...(Platform.OS === "web" && hovered 187 + ? { backgroundColor: "rgba(255,255,255,0.15)", borderRadius: 6 } 188 + : {}), 189 + }} 203 190 > 204 191 {children} 205 192 </Pressable>