added names for resource chart
This commit is contained in:
@@ -24,7 +24,7 @@ export default function Content() {
|
|||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
<Route exact path="/" component={Overview} />
|
<Route exact path="/" component={Overview} />
|
||||||
<Route path="/resources" component={SelectResource} />
|
<Route path="/resources" component={SelectResource} />
|
||||||
<Route path="/resourcechart/:id" render={() => <ResourceChart />} />
|
<Route path="/resourcechart/:id" component={ResourceChart} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -93,13 +93,12 @@ export default function ResourceChart(props) {
|
|||||||
const handleClick = (e) => {
|
const handleClick = (e) => {
|
||||||
loadData()
|
loadData()
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="h4">
|
<Typography variant="h4">
|
||||||
Resource Chart
|
{props.location.state.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default function ResourceCard(props) {
|
|||||||
<Grid item xs={4} lg={2} key={props.resource["name"]}>
|
<Grid item xs={4} lg={2} key={props.resource["name"]}>
|
||||||
<Card >
|
<Card >
|
||||||
<CardContent style={{ padding: 0 }}>
|
<CardContent style={{ padding: 0 }}>
|
||||||
<ListItemLink to={"/resourcechart/" + props.resource["db_letter"]} component={Link}>
|
<ListItemLink to={{ pathname: "/resourcechart/" + props.resource["db_letter"], state: { name: props.resource["name"] } }} component={Link} >
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<img src={picture} alt={props.resource["name"]} style={{ width: 50, height: 50 }} />
|
<img src={picture} alt={props.resource["name"]} style={{ width: 50, height: 50 }} />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
|
|||||||
Reference in New Issue
Block a user