When add Image in list with fetch I have error.
Whoops, something went wrong. Our engineers have been automatically alerted.
Until we can resolve the issue, please delete the last component you added or undo the last config that you made.
Questions? Click Help at the top of your Builder window, or launch a Chat with us.
TypeError: Cannot read property ‘url’ of undefinedconst THEME = {“disabledOpacity”:0.5,“spacing”:{“gutters”:16,“text”:4,“small”:8,“medium”:12,“large”:16},“borderRadius”:{“global”:6,“button”:24},“colors”:{“background”:“rgba(251, 252, 253, 1)”,“divider”:“rgba(234, 237, 242, 1)”,“error”:“rgba(255, 69, 100, 1)”,“light”:“rgba(165, 173, 183, 1)”,“lightInverse”:“rgba(255, 255, 255, 0.68)”,“medium”:“rgba(70, 78, 88, 1)”,“mediumInverse”:“rgba(255, 255, 255, 0.87)”,“primary”:“rgba(90, 69, 255, 1)”,“secondary”:“rgba(59, 201, 234, 1)”,“strong”:“rgba(18, 20, 44, 1)”,“strongInverse”:“rgba(255, 255, 255, 1)”,“surface”:“rgba(255, 255, 255, 1)”},“typography”:{“body1”:{“fontSize”:16,“lineHeight”:26,“letterSpacing”:0,“fontWeight”:“regular”},“body2”:{“fontSize”:14,“lineHeight”:22,“letterSpacing”:0,“fontWeight”:“regular”},“button”:{“fontSize”:14,“lineHeight”:16,“letterSpacing”:0,“fontWeight”:“bold”},“caption”:{“fontSize”:12,“lineHeight”:16,“letterSpacing”:0,“fontWeight”:“regular”},“headline1”:{“fontSize”:60,“lineHeight”:71,“letterSpacing”:0,“fontWeight”:“bold”},“headline2”:{“fontSize”:48,“lineHeight”:58,“letterSpacing”:0,“fontWeight”:“bold”},“headline3”:{“fontSize”:34,“lineHeight”:40,“letterSpacing”:0,“fontWeight”:“bold”},“headline4”:{“fontSize”:24,“lineHeight”:34,“letterSpacing”:0,“fontWeight”:“bold”},“headline5”:{“fontSize”:20,“lineHeight”:26,“letterSpacing”:0,“fontWeight”:“bold”},“headline6”:{“fontSize”:16,“lineHeight”:24,“letterSpacing”:0,“fontWeight”:“bold”},“overline”:{“fontSize”:12,“lineHeight”:16,“letterSpacing”:2,“fontWeight”:“regular”},“subtitle1”:{“fontSize”:16,“lineHeight”:26,“letterSpacing”:0,“fontWeight”:“regular”},“subtitle2”:{“fontSize”:14,“lineHeight”:22,“letterSpacing”:0,“fontWeight”:“regular”}},“elevation”:{“0”:{“shadowColor”:“rgba(18, 20, 44, 1)”,“shadowOffset”:{“width”:0,“height”:0},“shadowRadius”:0,“shadowOpacity”:0,“borderWidth”:0,“borderColor”:“rgba(18, 20, 44, 1)”,“borderOpacity”:0},“1”:{“shadowColor”:“rgba(18, 20, 44, 1)”,“shadowOffset”:{“width”:0,“height”:2},“shadowRadius”:4,“shadowOpacity”:0.06,“borderWidth”:1,“borderColor”:“rgba(18, 20, 44, 1)”,“borderOpacity”:0.06},“2”:{“shadowColor”:“rgba(18, 20, 44, 1)”,“shadowOffset”:{“width”:0,“height”:2},“shadowRadius”:4,“shadowOpacity”:0.08,“borderWidth”:0,“borderColor”:“rgba(18, 20, 44, 1)”,“borderOpacity”:0},“3”:{“shadowColor”:“rgba(18, 20, 44, 1)”,“shadowOffset”:{“width”:0,“height”:6},“shadowRadius”:6,“shadowOpacity”:0.12,“borderWidth”:0,“borderColor”:“rgba(18, 20, 44, 1)”,“borderOpacity”:0}}};
const Constants = {};
const Images = {};
const BlankScreen = props => {
const theme = THEME
return (
<ScreenContainer data-uuid={“9PIJbBWB”} hasSafeArea={true} scrollable={false}>
<Fetch
url={https://picsum.photos/v2/list/
}
headers={{“Accept”: “application/json”,“Content-Type”: “application/json”}}
{({ loading, error, data, refetch }) => {
if (loading) {
return (null)
}
if (error) {
return (null)
}
if (!data) {
return (null)
}
return (<FlatList data-uuid={“EQwJIhTy”} renderItem={({ item }) =>
<Text data-uuid={“0GkzXyS4”} style={StyleSheet.flatten([styles.Text_0G, theme.typography.headline4, { color: theme.colors.strong, textDecorationColor: theme.colors.strong }])}>
{item && item[“author”]}
} ListHeaderComponent={({ item }) => <Image data-uuid={“4R18YQ1V”} style={styles.Image_4R}resizeMode=“cover” source={{ uri: item[“url”] }} />} numColumns={1} data={data} />)
}}
)
}
const styles = StyleSheet.create({ Image_4R: {
width: 250, height: 250 }, Text_0G: {
textAlign: “center” } })
BlankScreen.defaultProps = { navigation: { navigate: () => {}, goBack: () => {}, reset: () => {}, setParams: () => {}, dispatch: () => {}, setOptions: () => {}, isFocused: () => {}, addListener: () => {}, } };
function App() {return };
const FRAME = StyleSheet.create({ frame: {
width: 375,
height: 812
}
});
render(App);