From 20fc5036f8de9109b21e901d04f0dac651e40fc6 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Apr 2021 23:48:33 +0200 Subject: add jakrawals countr and sync script --- frontend/site/projects/museum/views/artists.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'frontend/site/projects/museum/views/artists.js') diff --git a/frontend/site/projects/museum/views/artists.js b/frontend/site/projects/museum/views/artists.js index 989d3f7..20345d0 100644 --- a/frontend/site/projects/museum/views/artists.js +++ b/frontend/site/projects/museum/views/artists.js @@ -9,7 +9,7 @@ import { ArrowLeft, ArrowRight } from "site/projects/museum/icons" export default class Artists extends Component { state = { currentIndex: 0, - detail: true, + detail: false, } constructor(props) { @@ -49,7 +49,7 @@ export default class Artists extends Component { {ARTIST_ORDER.map((key, index) => { const artist = ARTISTS[key] return ( -
this.showArtist(currentIndex)}> +
this.showArtist(index)}> {artist.name}
) @@ -61,7 +61,8 @@ export default class Artists extends Component { artist={ARTISTS[key]} key={key} index={index} - isCurrent={currentIndex === index} + isCurrent={detail && currentIndex === index} + onClose={() => this.setState({ detail: false })} /> ))}
{ArrowLeft}
@@ -72,7 +73,7 @@ export default class Artists extends Component { } } -const ArtistDetail = ({ artist, index, isCurrent }) => { +const ArtistDetail = ({ artist, index, isCurrent, onClose }) => { return (
@@ -81,7 +82,7 @@ const ArtistDetail = ({ artist, index, isCurrent }) => {
-
+
{artist.name}
{artist.location}
-- cgit v1.2.3-70-g09d2