Skip to content

Commit

Permalink
Merge pull request #1906 from emanuelheredia/carousel_bug_fixing
Browse files Browse the repository at this point in the history
TP-1535: Bug fixing
  • Loading branch information
aguescribano87 authored Jul 1, 2024
2 parents 9d2416b + 706d82a commit 2c1a94f
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,4 @@



window['STORIES'] = [];</script><script src="runtime~main.9390b27b.iframe.bundle.js"></script><script src="vendors~main.2eb898cf.iframe.bundle.js"></script><script src="main.15f5c767.iframe.bundle.js"></script></body></html>
window['STORIES'] = [];</script><script src="runtime~main.9390b27b.iframe.bundle.js"></script><script src="vendors~main.2eb898cf.iframe.bundle.js"></script><script src="main.bc7d260c.iframe.bundle.js"></script></body></html>
3 changes: 0 additions & 3 deletions docs/main.15f5c767.iframe.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/main.15f5c767.iframe.bundle.js.map

This file was deleted.

3 changes: 3 additions & 0 deletions docs/main.bc7d260c.iframe.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/main.bc7d260c.iframe.bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/carousel/src/components/FullScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const FullScreen = ({
closeFullscreen()
}
}

const closeFullscreen = () => {
handleImageClickToFullscreen(URLOpenFullscreen)
setFullscreen(false)
Expand Down
6 changes: 5 additions & 1 deletion packages/carousel/src/components/SliderSwap.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export const SliderSwap = ({
}, [translateX, fullScreen])

useEffect(() => {
setURLOpenFullscreen(files[visibledIndex])
setURLOpenFullscreen(files[visibledIndex || 0])
if (handleImageClickToFullscreen) {
handleImageClickToFullscreen(files[visibledIndex])
}
Expand All @@ -194,6 +194,10 @@ export const SliderSwap = ({
}
}, [fullScreen, tabSelected, sliderContainerWidth])

useEffect(() => {
if (fullScreen) handleTraslate(-sliderContainerWidth * index)
}, [index])

const handleImgError = (url) => {
setImgErrors((prevErrors) => ({
...prevErrors,
Expand Down

0 comments on commit 2c1a94f

Please sign in to comment.