maybe fix?
This commit is contained in:
parent
97a634204f
commit
b4b975cd2e
@ -68,21 +68,24 @@ class Main extends Component {
|
|||||||
this.setState({faq: !this.state.faq});
|
this.setState({faq: !this.state.faq});
|
||||||
}
|
}
|
||||||
render(){
|
render(){
|
||||||
let photos = [];
|
let photos_gallery = [];
|
||||||
|
let photos_carousel = []
|
||||||
for (const photo of this.state.photos){
|
for (const photo of this.state.photos){
|
||||||
photos.push({
|
photos_gallery.push({
|
||||||
source: photo.original,
|
|
||||||
src: photo.thumbnail,
|
src: photo.thumbnail,
|
||||||
width: photo.original_width,
|
width: photo.original_width,
|
||||||
height: photo.original_height,
|
height: photo.original_height,
|
||||||
})
|
})
|
||||||
|
photos_carousel.push({
|
||||||
|
source: photo.original
|
||||||
|
})
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<ModalGateway>
|
<ModalGateway>
|
||||||
{this.state.photoIsOpen &&
|
{this.state.photoIsOpen &&
|
||||||
<Modal onClose={this.togglePhoto}>
|
<Modal onClose={this.togglePhoto}>
|
||||||
<Carousel views={photos} currentIndex={this.state.currentImage} />
|
<Carousel views={photos_carousel} currentIndex={this.state.currentImage} />
|
||||||
</Modal>
|
</Modal>
|
||||||
}
|
}
|
||||||
</ModalGateway>
|
</ModalGateway>
|
||||||
@ -100,7 +103,7 @@ class Main extends Component {
|
|||||||
</nav>
|
</nav>
|
||||||
{this.state.page == "#gallery" &&
|
{this.state.page == "#gallery" &&
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<Gallery photos={photos} onClick={this.openPhoto}/>
|
<Gallery photos={photos_gallery} onClick={this.openPhoto}/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{this.state.page == "" &&
|
{this.state.page == "" &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user