Added titles to pages.
This commit is contained in:
		
							parent
							
								
									89762e4428
								
							
						
					
					
						commit
						970449fc5f
					
				
							
								
								
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -5656,7 +5656,7 @@
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        "core-js": {
 | 
					        "core-js": {
 | 
				
			||||||
          "version": "2.5.5",
 | 
					          "version": "2.5.5",
 | 
				
			||||||
          "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz",
 | 
					          "resolved": "http://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz",
 | 
				
			||||||
          "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs="
 | 
					          "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs="
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        "firebase": {
 | 
					        "firebase": {
 | 
				
			||||||
 | 
				
			|||||||
@ -27,6 +27,23 @@ const styles = theme => ({
 | 
				
			|||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class FlameLinkCollectionGallery extends Component {
 | 
					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) {
 | 
					    constructor(props) {
 | 
				
			||||||
        super(props);
 | 
					        super(props);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -53,6 +70,8 @@ class FlameLinkCollectionGallery extends Component {
 | 
				
			|||||||
                    schemaDescription: result.title
 | 
					                    schemaDescription: result.title
 | 
				
			||||||
                }))
 | 
					                }))
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.getPageTitle(this.props.galleryName);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    getGalleryInfo(schemaDetails, schemaContent) {
 | 
					    getGalleryInfo(schemaDetails, schemaContent) {
 | 
				
			||||||
@ -75,11 +94,11 @@ class FlameLinkCollectionGallery extends Component {
 | 
				
			|||||||
        return mediaNums.map(this.createGallery, mediaIDs);
 | 
					        return mediaNums.map(this.createGallery, mediaIDs);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    createGallery (num) {
 | 
					    createGallery(num) {
 | 
				
			||||||
        if(num === '0'){
 | 
					        if (num === '0') {
 | 
				
			||||||
                global.galleryImages = [];
 | 
					            global.galleryImages = [];
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return <FlameLinkCollectionGalleryContent mediaIDs={this} num={num} key={this[num]} />
 | 
					        return <FlameLinkCollectionGalleryContent mediaIDs={this} num={num} key={this[num]} />;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    render() {
 | 
					    render() {
 | 
				
			||||||
@ -93,7 +112,7 @@ class FlameLinkCollectionGallery extends Component {
 | 
				
			|||||||
                </Typography>
 | 
					                </Typography>
 | 
				
			||||||
                <Grid container className={classes.flamelinkGalleryContainer}>
 | 
					                <Grid container className={classes.flamelinkGalleryContainer}>
 | 
				
			||||||
                    <Grid item lg={8} md={8} sm={12} xs={12} className={classes.flamelinkGallery} >
 | 
					                    <Grid item lg={8} md={8} sm={12} xs={12} className={classes.flamelinkGallery} >
 | 
				
			||||||
                        <RenderGallery key={Math.random()}/>
 | 
					                        <RenderGallery key={Math.random()} />
 | 
				
			||||||
                    </Grid>
 | 
					                    </Grid>
 | 
				
			||||||
                </Grid>
 | 
					                </Grid>
 | 
				
			||||||
            </Grid>
 | 
					            </Grid>
 | 
				
			||||||
 | 
				
			|||||||
@ -24,6 +24,10 @@ class About extends Component {
 | 
				
			|||||||
        }))
 | 
					        }))
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    componentDidMount() {
 | 
				
			||||||
 | 
					        document.title = 'Marten Tracker | About';
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    render() {
 | 
					    render() {
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        return (
 | 
					        return (
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user