All images are retrieved instead of one.
See original GitHub issueHi!
I am using your cool gallery and I am struggling with calls to server. Probably I am doing something wrong, but I cannot find it. Could you look at it?
I created my component and added simple code
function Gallery() {
const [serverImages, setserverImages] = useState([]);
const getLinks = () => {
let x= window.innerHeight;
console.log(x);
console.log("get from endpoint");
fetch(`https://localhost:5001/api/Images/List?height=`+x, {
method: 'GET',
headers: { 'Content-Type': 'application/json' }
})
.then(response => response.json())
.then(result => setserverImages(result));
}
const handleClick=function(){
debugger;
getLinks();
}
return (
<div>
<button onClick={handleClick}>zrob</button>
<ImageGallery items={serverImages} />
</div>
)
}
export default Gallery;
Unfortunatelly after each click on the button next, all images are received from server.
So I have a gallery loaded. All small pictures below, one big picture in the middle of the screen.
My network is empty
After clicking button next calls to all images is made. And all images are retrieved, each time I am clicking next button.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Image retrieval - Wikipedia
An image retrieval system is a computer system used for browsing, searching and retrieving images from a large database of digital images.
Read more >Image not retrieved (crawl rate too slow) or (crawl pending)
One or more of your products is disapproved and images are not displaying in Shopping ads or free listings. This could be due...
Read more >Does storing a lot of images in a single directory slow down ...
The answer to that is "maybe". It's possible the file retrieval may be fine, but if you need ...
Read more >If you're missing photos or videos in the Photos app
Tap a photo or video, then tap Recover. To recover multiple photos, tap Select, select your photos or videos, then tap Recover. Confirm...
Read more >7 Reasons Why Images Are Not Loading on Your Website
1. Incorrect File Paths · 2. Files Names Misspelled · 3. Wrong File Extensions · 4. Missing Files · 5. The Website Hosting...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pwujczyk Try unchecking the “Disable Cache” in your chrome dev tools and see if that fixes the issue.
see #583
closing, feel free to reopen if you find issues.