From edfbabe08a50967e1411d54b7b6a4e218c0f3f15 Mon Sep 17 00:00:00 2001 From: WildScotsmen Date: Tue, 11 Dec 2018 15:06:27 -0500 Subject: [PATCH] Shotgunned a fix for gallery page titles. --- .../flamelink/FlameLinkCollectionGallery.js | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/components/flamelink/FlameLinkCollectionGallery.js b/src/components/flamelink/FlameLinkCollectionGallery.js index eb0f8ed..298ba5a 100644 --- a/src/components/flamelink/FlameLinkCollectionGallery.js +++ b/src/components/flamelink/FlameLinkCollectionGallery.js @@ -41,23 +41,6 @@ const styles = theme => ({ }); class FlameLinkCollectionGallery extends Component { - getPageTitle = galleryName => { - switch (galleryName) { - case 'martensAndKits': - document.title = 'Marten Tracker | Martens and Kits'; - break; - case 'martensAtNight': - document.title = 'Marten Tracker | Martens at Night'; - break; - case 'martensBeingMartens': - document.title = 'Marten Tracker | Martens Being Martens'; - break; - default: - document.title = 'Marten Tracker | Galleries'; - break; - } - } - constructor(props) { super(props); @@ -84,8 +67,10 @@ class FlameLinkCollectionGallery extends Component { schemaDescription: result.title })) } + } - this.getPageTitle(this.props.galleryName); + componentDidMount() { + document.title = 'Marten Tracker | Galleries'; } getGalleryInfo(schemaDetails, schemaContent) {