- Notifications
You must be signed in to change notification settings - Fork 48
Closed
Description
The package has some issues which i will list here.
1)url key word must be present for it to work.
2) it's always expecting an element at index 0 for some reason
3) When the page first loads it always shows a black screen
4)if there is only one image, it doesn't load it or show it.
I had to make a workaround to fix these problems as such
const [imgUrls, setIMGUrls] = useState([{url:""}]);
await firebase.firestore().collection("Properties").where("propertyID","==",propID).get().then((snapshot) => { let images = [] snapshot.forEach((doc) => { const {imageUrls} = doc.data(); images = [...images, ...imageUrls.map(url => ({ url }))] }) setIMGUrls(images) }) return ( <SimpleImageSlider width={896} height={504} images={imgUrls} showBullets={true} showNavs={true} autoPlay={true} /> )
line of code that is causing the problem:
Metadata
Metadata
Assignees
Labels
No labels