summaryrefslogtreecommitdiff
path: root/frontend/site/projects/museum/views/essay.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/site/projects/museum/views/essay.js')
-rw-r--r--frontend/site/projects/museum/views/essay.js10
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>
)
}