Added loadingbar for resource loading close #38
This commit is contained in:
@@ -3,6 +3,7 @@ import { makeStyles } from '@material-ui/core/styles';
|
||||
import Grid from '@material-ui/core/Grid';
|
||||
import ResourceCard from './resourceCard';
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
import CircularProgress from '@material-ui/core/CircularProgress';
|
||||
|
||||
|
||||
const useStyles = makeStyles(theme => ({
|
||||
@@ -61,149 +62,151 @@ export default function SelectResource() {
|
||||
loadResources();
|
||||
|
||||
return (
|
||||
resources.length === 0 ?
|
||||
<CircularProgress color="secondary" disableShrink /> :
|
||||
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Agriculture & Food
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Agriculture & Food
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[0]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[0]}
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Construction
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[1]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Fashion
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[2]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Energy
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[3]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Electronics
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[4]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Automotive
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[5]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Aerospace
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[6]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Resources
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[7]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Research
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[8]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Others
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[9]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Construction
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[1]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Fashion
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[2]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Energy
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[3]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Electronics
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[4]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Automotive
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[5]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Aerospace
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[6]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Resources
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[7]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Research
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[8]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={2} >
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="h4">
|
||||
Others
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.grid}>
|
||||
<Grid container spacing={1} >
|
||||
{resources[9]}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user