A React component library for rendering common AT Protocol records for applications such as Bluesky and Leaflet.

be stricter about record being passed

+2 -3
lib/components/BlueskyPost.tsx
··· 203 ); 204 } 205 206 - // When record is provided, pass it directly to skip fetching 207 - if (record) { 208 return ( 209 <AtProtoRecord<FeedPostRecord> 210 record={record} ··· 215 ); 216 } 217 218 - // Otherwise fetch the record using did, collection, and rkey 219 return ( 220 <AtProtoRecord<FeedPostRecord> 221 did={repoIdentifier}
··· 203 ); 204 } 205 206 + 207 + if (record !== undefined) { 208 return ( 209 <AtProtoRecord<FeedPostRecord> 210 record={record} ··· 215 ); 216 } 217 218 return ( 219 <AtProtoRecord<FeedPostRecord> 220 did={repoIdentifier}
+1 -3
lib/components/BlueskyProfile.tsx
··· 135 ); 136 }; 137 138 - // When record is provided, pass it directly to skip fetching 139 - if (record) { 140 return ( 141 <AtProtoRecord<ProfileRecord> 142 record={record} ··· 147 ); 148 } 149 150 - // Otherwise fetch the record using did, collection, and rkey 151 return ( 152 <AtProtoRecord<ProfileRecord> 153 did={repoIdentifier}
··· 135 ); 136 }; 137 138 + if (record !== undefined) { 139 return ( 140 <AtProtoRecord<ProfileRecord> 141 record={record} ··· 146 ); 147 } 148 149 return ( 150 <AtProtoRecord<ProfileRecord> 151 did={repoIdentifier}
+1 -3
lib/components/LeafletDocument.tsx
··· 121 ); 122 }; 123 124 - // When record is provided, pass it directly to skip fetching 125 - if (record) { 126 return ( 127 <AtProtoRecord<LeafletDocumentRecord> 128 record={record} ··· 133 ); 134 } 135 136 - // Otherwise fetch the record using did, collection, and rkey 137 return ( 138 <AtProtoRecord<LeafletDocumentRecord> 139 did={did}
··· 121 ); 122 }; 123 124 + if (record !== undefined) { 125 return ( 126 <AtProtoRecord<LeafletDocumentRecord> 127 record={record} ··· 132 ); 133 } 134 135 return ( 136 <AtProtoRecord<LeafletDocumentRecord> 137 did={did}
+1 -3
lib/components/TangledString.tsx
··· 82 /> 83 ); 84 85 - // When record is provided, pass it directly to skip fetching 86 - if (record) { 87 return ( 88 <AtProtoRecord<TangledStringRecord> 89 record={record} ··· 94 ); 95 } 96 97 - // Otherwise fetch the record using did, collection, and rkey 98 return ( 99 <AtProtoRecord<TangledStringRecord> 100 did={did}
··· 82 /> 83 ); 84 85 + if (record !== undefined) { 86 return ( 87 <AtProtoRecord<TangledStringRecord> 88 record={record} ··· 93 ); 94 } 95 96 return ( 97 <AtProtoRecord<TangledStringRecord> 98 did={did}