diff --git a/src/components/Main.js b/src/components/Main.js index 5d6c69a..b196583 100644 --- a/src/components/Main.js +++ b/src/components/Main.js @@ -224,17 +224,17 @@ class ResponsiveDrawer extends React.Component { - + - + - + @@ -262,22 +262,22 @@ class ResponsiveDrawer extends React.Component { - + - + - + - + @@ -348,19 +348,19 @@ class ResponsiveDrawer extends React.Component {
- - { return }} /> - { return }} /> - { return }} /> - { return }} /> - { return }} /> - { return }} /> - { return }} /> - { return }} /> - { return }} /> - { return }} /> - { return }} /> - { return }} /> + + + + + + + + + + + + +
diff --git a/src/components/SightingMap.js b/src/components/SightingMap.js index ebe21cd..abc06b8 100644 --- a/src/components/SightingMap.js +++ b/src/components/SightingMap.js @@ -297,8 +297,8 @@ export class MapContainer extends Component { description={Description: {sighting.desc}} icon={{ url: pinIcon, - anchor: new google.maps.Point(48,48), - scaledSize: new google.maps.Size(48,48) + anchor: new google.maps.Point(32,32), + scaledSize: new google.maps.Size(32,32) }} /> ) diff --git a/src/components/flamelink/FlameLinkCollectionGallery.js b/src/components/flamelink/FlameLinkCollectionGallery.js index eb0f8ed..242de80 100644 --- a/src/components/flamelink/FlameLinkCollectionGallery.js +++ b/src/components/flamelink/FlameLinkCollectionGallery.js @@ -41,51 +41,52 @@ 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); + var galleryName, showTitle; + + if (this.props.galleryName !== undefined) { + galleryName = this.props.galleryName; + } else { + galleryName = this.props.location.state.galleryName; + } + + if (this.props.showTitle !== undefined) { + showTitle = this.props.showTitle; + } else { + showTitle = this.props.location.state.showTitle; + } + this.state = { + galleryName: galleryName, + showTitle: showTitle, schemaDetails: '', schemaContent: '', schemaDescription: '', }; - flamelinkApp.schemas.getFields(this.props.galleryName, { fields: ['title', 'key', 'type', 'gridColumns', 'description', 'options'] }) + flamelinkApp.schemas.getFields(this.state.galleryName, { fields: ['title', 'key', 'type', 'gridColumns', 'description', 'options'] }) .then(result => this.setState({ schemaDetails: result })) - flamelinkApp.content.get(this.props.galleryName) + flamelinkApp.content.get(this.state.galleryName) .then(result => this.setState({ schemaContent: result })) - if (this.props.showTitle === false) { + if (this.state.showTitle === false) { } else { - flamelinkApp.schemas.get(this.props.galleryName) + flamelinkApp.schemas.get(this.state.galleryName) .then(result => this.setState({ schemaDescription: result.title })) } + } - this.getPageTitle(this.props.galleryName); + componentDidMount() { + document.title = 'Marten Tracker | Galleries'; } getGalleryInfo(schemaDetails, schemaContent) { diff --git a/src/components/forms/ContactForm.js b/src/components/forms/ContactForm.js index 28ccef3..8170995 100644 --- a/src/components/forms/ContactForm.js +++ b/src/components/forms/ContactForm.js @@ -130,7 +130,7 @@ class ContactForm extends React.Component { {
} - Send us an email! + Feel free to contact us if you have any questions about American martens,{
}encountered any difficulties with the website, or if you have any ideas for future marten research.
diff --git a/src/pages/QuizPage.js b/src/pages/QuizPage.js index 9abcb0e..bbe9a9c 100644 --- a/src/pages/QuizPage.js +++ b/src/pages/QuizPage.js @@ -3,13 +3,14 @@ import QuizGame from '../components/QuizGame'; class QuizPage extends Component { - componentDidMount() { + componentWillMount() { document.title = 'Marten Tracker | Quiz'; + this.setState({difficulty: this.props.location.state.difficulty}); } render() { return ( - + ); } }