Removed Info.js and replaced with About.js for clarity. Also added some stylings for FlameLink images using css.
This commit is contained in:
		
							parent
							
								
									f015e11864
								
							
						
					
					
						commit
						31a5887b7b
					
				@ -1,7 +1,7 @@
 | 
			
		||||
import React, { Component } from 'react';
 | 
			
		||||
import Typography from '@material-ui/core/Typography';
 | 
			
		||||
import flamelinkApp from '../flamelink.js';
 | 
			
		||||
 | 
			
		||||
import '../css/FlameLinkImage.css';
 | 
			
		||||
 | 
			
		||||
class FlameLinkImage extends Component {
 | 
			
		||||
    constructor() {
 | 
			
		||||
@ -20,7 +20,7 @@ class FlameLinkImage extends Component {
 | 
			
		||||
    render() {
 | 
			
		||||
        return(
 | 
			
		||||
                <Typography align='center'>
 | 
			
		||||
                    <img src={this.state.mediaURL} width="70%" alt='' />
 | 
			
		||||
                    <img src={this.state.mediaURL} className='flamelinkImage' alt='' />
 | 
			
		||||
                </Typography>
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -21,7 +21,7 @@ import ListIcon from '@material-ui/icons/List';
 | 
			
		||||
import SlideshowIcon from '@material-ui/icons/Slideshow';
 | 
			
		||||
import Home from '../pages/Home';
 | 
			
		||||
import ViewMap from '../pages/ViewMap';
 | 
			
		||||
import Info from '../pages/Info';
 | 
			
		||||
import About from '../pages/About';
 | 
			
		||||
import Quiz from '../pages/QuizPage';
 | 
			
		||||
import SightingList from '../pages/SightingList';
 | 
			
		||||
import Report from '../pages/Report';
 | 
			
		||||
@ -195,7 +195,7 @@ class ResponsiveDrawer extends React.Component {
 | 
			
		||||
                    {this.state.key === 'Report' && <Report />}
 | 
			
		||||
                    {this.state.key === 'Map' && <ViewMap />}
 | 
			
		||||
                    {this.state.key === 'List' && <SightingList />}
 | 
			
		||||
                    {this.state.key === 'About' && <Info />}
 | 
			
		||||
                    {this.state.key === 'About' && <About />}
 | 
			
		||||
                    {this.state.key === 'Easy-Quiz' && <Quiz difficulty='Easy'/>}
 | 
			
		||||
                    {this.state.key === 'Medium-Quiz' && <Quiz difficulty='Medium'/>}
 | 
			
		||||
                    {this.state.key === 'Hard-Quiz' && <Quiz difficulty='Hard'/>}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								src/css/FlameLinkImage.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								src/css/FlameLinkImage.css
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
.flamelinkImage {
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  max-width: 500px;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										34
									
								
								src/pages/About.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								src/pages/About.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,34 @@
 | 
			
		||||
import React, { Component, Fragment } from 'react';
 | 
			
		||||
import FlameLinkComponentCreations from '../components/FlameLinkComponentCreations';
 | 
			
		||||
import flamelinkApp from '../flamelink.js';
 | 
			
		||||
 | 
			
		||||
class About extends Component {
 | 
			
		||||
    constructor() {
 | 
			
		||||
        super();
 | 
			
		||||
 | 
			
		||||
        global.schemaName = 'martenSchemaDemo';
 | 
			
		||||
 | 
			
		||||
        this.state = {
 | 
			
		||||
          schemaDetails: '',
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        flamelinkApp.schemas.getFields(global.schemaName, { fields: [ 'title', 'key', 'type', 'gridColumns', 'description', 'options' ] })
 | 
			
		||||
        .then(result => this.setState({
 | 
			
		||||
          schemaDetails: result
 | 
			
		||||
        }))
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
    render() {
 | 
			
		||||
        
 | 
			
		||||
        return (
 | 
			
		||||
            <div>
 | 
			
		||||
                <Fragment>
 | 
			
		||||
                    <FlameLinkComponentCreations schemaDetails = {this.state.schemaDetails}/>
 | 
			
		||||
                </Fragment>
 | 
			
		||||
          
 | 
			
		||||
            </div>
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default About;
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user