This commit is contained in:
Martin Quarda 2024-05-08 11:15:39 +02:00
parent c4e95417a8
commit 0a043b87ad
2 changed files with 3 additions and 4 deletions

View File

@ -64,7 +64,7 @@ def results(request):
def photos(request): def photos(request):
files = glob.glob("photos/*.jpg") files = glob.glob("photos/*.webp")
rtn = [] rtn = []
for file in files: for file in files:
img = PIL.Image.open(file) img = PIL.Image.open(file)

View File

@ -77,15 +77,14 @@ class Main extends Component {
height: photo.original_height, height: photo.original_height,
}) })
}; };
console.log(photos, this.state.photos)
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} currentIndex={this.state.currentImage} />
</Modal> </Modal>
) : null} }
</ModalGateway> </ModalGateway>
<nav class="navbar navbar-expand-lg bg-body-tertiary"> <nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container"> <div class="container">