Skip to content

Commit fc0ed8b

Browse files
author
Igor Canedo
committed
removing backstage-photo from resourceMock
1 parent 9d6870a commit fc0ed8b

File tree

2 files changed

+5
-23
lines changed

2 files changed

+5
-23
lines changed

sample/src/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import data from './resourceMock.json';
2121
const styles = StyleSheet.create({
2222
container: {
2323
flex: 1,
24-
marginLeft: 16,
25-
marginRight: 16,
24+
paddingHorizontal: 16,
2625
backgroundColor: '#F5FCFF',
2726
},
2827
});
@@ -93,12 +92,12 @@ const customStyles = {
9392

9493
const atomicHandler = (item: Object): any => {
9594
switch (item.data.type) {
96-
case 'backstage-photo':
95+
case 'image':
9796
return (
9897
<View key={item.key} style={{ flex: 1 }}>
9998
<Image
10099
style={{ width: 288, height: 161 }}
101-
source={{ uri: item.data.file.url }}
100+
source={{ uri: item.data.url }}
102101
/>
103102
</View>
104103
);

sample/src/resourceMock.json

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,8 @@
6262
"inlineStyleRanges": [],
6363
"entityRanges": [],
6464
"data": {
65-
"type": "backstage-photo",
66-
"rightsHolder": "globoesporte 5",
67-
"caption": "globoesporte 5",
68-
"file": {
69-
"url": "https://s2.glbimg.com/epsYZ-ixGirZCmCp31JjSMWmgYU=/640x350/smart/http://s.glbimg.com/en/ho/static/thumbor/why-thumbor-4.jpg",
70-
"width": 3000,
71-
"type": "image/jpeg",
72-
"height": 2000,
73-
"thumborUrl": "https://s2.glbimg.com/epsYZ-ixGirZCmCp31JjSMWmgYU=/640x350/smart/http://s.glbimg.com/en/ho/static/thumbor/why-thumbor-4.jpg",
74-
"crop": {
75-
"top": 0,
76-
"left": 0,
77-
"bottom": 2000,
78-
"right": 3000,
79-
"height": 2000,
80-
"width": 3000
81-
}
82-
},
83-
"display": "normal"
65+
"type": "image",
66+
"url": "https://lorempixel.com/400/200/"
8467
}
8568
},
8669
{

0 commit comments

Comments
 (0)