summaryrefslogtreecommitdiff
path: root/src/views/Gallery.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-10-08 16:37:09 +0200
committerJules Laplace <julescarbon@gmail.com>2021-10-08 16:37:09 +0200
commit9c4afb8fd5ec7552eb67aa3c01e0cd1aabe612bc (patch)
tree84b5a6cb6a06ebfc21270120c7f4b471a90b793e /src/views/Gallery.js
parente96be58325301f757d25e496f864f6a67d33dc80 (diff)
fixing race condition
Diffstat (limited to 'src/views/Gallery.js')
-rw-r--r--src/views/Gallery.js24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/views/Gallery.js b/src/views/Gallery.js
index 7681e3b..b69a7d7 100644
--- a/src/views/Gallery.js
+++ b/src/views/Gallery.js
@@ -60,18 +60,22 @@ export default function Gallery({ images, visible, onLoad }) {
</div>
<div className="buttons arrows">
{!oneItem && (
- <img
- src="/assets/img/arrow-back.svg"
- onClick={previous}
- style={{ opacity: index > 0 ? 1 : 0 }}
- />
+ <div>
+ <img
+ src="/assets/img/arrow-back.svg"
+ onClick={previous}
+ style={{ opacity: index > 0 ? 1 : 0 }}
+ />
+ </div>
)}
{!oneItem && (
- <img
- src="/assets/img/arrow-forward.svg"
- onClick={next}
- style={{ opacity: index < images.length - 1 ? 1 : 0 }}
- />
+ <div>
+ <img
+ src="/assets/img/arrow-forward.svg"
+ onClick={next}
+ style={{ opacity: index < images.length - 1 ? 1 : 0 }}
+ />
+ </div>
)}
</div>
</div>