diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-04-16 21:33:09 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-04-16 21:33:09 +0200 |
| commit | a20da98081b91bcdb8d02c68edf6fcccf8fb046a (patch) | |
| tree | cac638d5ea1d2b770442447b31551178e4a68343 /frontend/site/projects/museum/views/essay.js | |
| parent | 5dc81aead9385555281e2945dc7a2b1f6f53d6fe (diff) | |
basic jakrawal
Diffstat (limited to 'frontend/site/projects/museum/views/essay.js')
| -rw-r--r-- | frontend/site/projects/museum/views/essay.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/frontend/site/projects/museum/views/essay.js b/frontend/site/projects/museum/views/essay.js index e271934..ddfbfcb 100644 --- a/frontend/site/projects/museum/views/essay.js +++ b/frontend/site/projects/museum/views/essay.js @@ -7,6 +7,8 @@ import "./essay.css" import { ARTISTS, ARTIST_ORDER, ESSAYS, ESSAY_ORDER } from "site/projects/museum/constants" import { ArrowLeft, ArrowRight, Globe } from "site/projects/museum/icons" +import { history } from "site/store" + export default class Essays extends Component { state = { currentIndex: 0, @@ -20,6 +22,7 @@ export default class Essays extends Component { this.previousEssay = this.previousEssay.bind(this) this.nextEssay = this.nextEssay.bind(this) this.close = this.close.bind(this) + this.goHome = this.goHome.bind(this) } componentDidMount() { @@ -45,6 +48,10 @@ export default class Essays extends Component { this.scrollToTop() } + goHome() { + history.push(`/last-museum/home/`) + } + scrollToTop() { setTimeout(() => { Array.from(this.ref.current.querySelectorAll(".artist-detail")).forEach(el => { @@ -88,6 +95,9 @@ export default class Essays extends Component { <div className="nav-arrow arrow-left" onClick={this.previousEssay}>{ArrowLeft}</div> <div className="nav-arrow arrow-right" onClick={this.nextEssay}>{ArrowRight}</div> </div> + <div className={detail ? "home-link black" : "home-link"} onClick={this.goHome}> + Home + </div> </div> ) } |
