Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 61x 4744x 4744x 7116x | import React from 'react';
import { Link } from 'react-router-dom/';
import Box from '@material-ui/core/Box';
import Typography from '@material-ui/core/Typography';
import useStyles from './styles';
const LinkList = ({ header, links, route }) => {
const classes = useStyles();
return (
<Box >
<Typography
component={Link}
to={route}
variant='body2'
color='textSecondary'
className={classes.linkTypography}>
{header}
</Typography>
{links.map((link) => {
return link.isExternal ? (
<a key={link.id} href={link.route}>
{link.header}
</a>
) : (
<Link key={link.id} to={link.route}>
{link.header}
</Link>
);
})}
</Box>
);
};
export default LinkList;
|