diff --git a/src/components/Main.js b/src/components/Main.js index f184b37..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/flamelink/FlameLinkCollectionGallery.js b/src/components/flamelink/FlameLinkCollectionGallery.js index 298ba5a..242de80 100644 --- a/src/components/flamelink/FlameLinkCollectionGallery.js +++ b/src/components/flamelink/FlameLinkCollectionGallery.js @@ -44,25 +44,41 @@ class FlameLinkCollectionGallery extends Component { 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 })) 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 ( - + ); } }