WrathChaos / react-native-apple-card-views

Customizable and perfect clone of Apple, App Store Card Views for React Native.
https://www.freakycoder.com
MIT License
402 stars 25 forks source link

Question about source (image) #16

Closed LydiaCha closed 3 years ago

LydiaCha commented 3 years ago

Hi, I'm not sure if this is an issue but I didn't know how else to contact you! I'm trying to customise the image on the cards.

For the title, I've successfully managed it with something like:

largeTitle={item.title}

However when it comes to using source for the image, it doesn't work quite the same. I've done the below but it doesn't seem to work:

source={item.imageUrlPath}

This might be a 'me' issue as the imageUrlPath is a field in Cloud Firestore that contains an image url referencing an image in Storage. But I just thought to ask if this has anything to do with the source prop.

Thanks!

WrathChaos commented 3 years ago

Hello @LydiaCha :) I think you need to set the source as:

source={{uri: item.imageUrlPath}}
LydiaCha commented 3 years ago

I get an error saying it can't find the variable imageUrlPath. This might be a me issue. Thanks though! If you have any other ideas let me know!

WrathChaos commented 3 years ago

Image only accepts a local require path or online URI. There is no other way to put the source into the Image. Debug your item.imageUrlPath.

if you have any other questions please feel free to ask :)