File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
src/shared/components/Contentful/Image Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -97,8 +97,13 @@ export class ImageInner extends React.Component {
97
97
animation . animateOnScroll ? (
98
98
< picture >
99
99
< source srcSet = { imageSources . source . file . url } type = { imageSources . source . file . contentType } media = "(min-width: 769px)" />
100
- { imageSources . sourceMobile && < source srcSet = { `${ imageSources . sourceMobile . file . url } ?w=768` } type = { imageSources . sourceMobile . file . contentType } media = "(max-width: 768px)" /> }
101
- < source srcSet = { `${ imageSources . source . file . url } ?w=768` } type = { imageSources . source . file . contentType } media = "(max-width: 768px)" />
100
+ {
101
+ imageSources . sourceMobile ? (
102
+ < source srcSet = { imageSources . sourceMobile . file . url } type = { imageSources . sourceMobile . file . contentType } media = "(max-width: 768px)" />
103
+ ) : (
104
+ < source srcSet = { `${ imageSources . source . file . url } ?w=768` } type = { imageSources . source . file . contentType } media = "(max-width: 768px)" />
105
+ )
106
+ }
102
107
< img
103
108
src = { `${ imageSources . source . file . url } ?fm=png` }
104
109
alt = { image . alt || image . name }
@@ -117,8 +122,13 @@ export class ImageInner extends React.Component {
117
122
) : (
118
123
< picture >
119
124
< source srcSet = { imageSources . source . file . url } type = { imageSources . source . file . contentType } media = "(min-width: 769px)" />
120
- { imageSources . sourceMobile && < source srcSet = { `${ imageSources . sourceMobile . file . url } ?w=768` } type = { imageSources . sourceMobile . file . contentType } media = "(max-width: 768px)" /> }
121
- < source srcSet = { `${ imageSources . source . file . url } ?w=768` } type = { imageSources . source . file . contentType } media = "(max-width: 768px)" />
125
+ {
126
+ imageSources . sourceMobile ? (
127
+ < source srcSet = { imageSources . sourceMobile . file . url } type = { imageSources . sourceMobile . file . contentType } media = "(max-width: 768px)" />
128
+ ) : (
129
+ < source srcSet = { `${ imageSources . source . file . url } ?w=768` } type = { imageSources . source . file . contentType } media = "(max-width: 768px)" />
130
+ )
131
+ }
122
132
< img
123
133
src = { `${ imageSources . source . file . url } ?fm=png` }
124
134
alt = { image . alt || image . name }
You can’t perform that action at this time.
0 commit comments