@quintype/native-components 2.28.3 → 2.28.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/native-components",
3
- "version": "2.28.3",
3
+ "version": "2.28.5",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -24,6 +24,7 @@ export const AuthorRow = ({
24
24
  return (
25
25
  <View style={styles.authorRow}>
26
26
  {authors?.map((author) => {
27
+ const avatarUrl = author?.['avatar-s3-key'] ? `${cdn}/${author?.['avatar-s3-key']}` : author?.['avatar-url'] ?? null;
27
28
  if (!author.name) {
28
29
  return null;
29
30
  }
@@ -33,10 +34,10 @@ export const AuthorRow = ({
33
34
  style={styles.imageBlock}
34
35
  testID={COMP_CONTENT_CONSTANTS.authorImage}
35
36
  >
36
- {author?.['avatar-s3-key'] ? (
37
+ {avatarUrl ? (
37
38
  <ResponsiveImage
38
39
  source={{
39
- uri: `${cdn}/${author?.['avatar-s3-key']}`,
40
+ uri: avatarUrl,
40
41
  }}
41
42
  style={styles.avatarImage}
42
43
  imageWidth={50}
@@ -29,10 +29,6 @@ const ResponsiveImageBase = (props) => {
29
29
  borderRadius: 12,
30
30
  overflow: "hidden",
31
31
  },
32
- props.imageWidth && {
33
- width: props.imageWidth,
34
- height: (props.imageWidth * 9) / 16,
35
- },
36
32
  ])
37
33
 
38
34
  const flattenedImageStyle = StyleSheet.flatten([
@@ -100,6 +96,7 @@ const ResponsiveImageBase = (props) => {
100
96
  style={flattenedImageStyle}
101
97
  source={sourceURI}
102
98
  resizeMode={FastImage.resizeMode.contain}
99
+ onLoad={()=>setPlaceholder(false)}
103
100
  {...props}
104
101
  />
105
102
  )