1import ArrowBackIcon from '@mui/icons-material/ArrowBack';
2import Button from '@mui/material/Button';
3import makeStyles from '@mui/styles/makeStyles';
4import { Link } from 'react-router';
5
6const useStyles = makeStyles((theme) => ({
7 backButton: {
8 position: 'sticky',
9 top: '80px',
10 backgroundColor: theme.palette.primary.dark,
11 color: theme.palette.primary.contrastText,
12 '&:hover': {
13 backgroundColor: theme.palette.primary.main,
14 color: theme.palette.primary.contrastText,
15 },
16 },
17}));
18
19function BackToListButton() {
20 const classes = useStyles();
21
22 return (
23 <Button
24 variant="contained"
25 className={classes.backButton}
26 aria-label="back to issue list"
27 component={Link}
28 to="/"
29 >
30 <ArrowBackIcon />
31 Back to List
32 </Button>
33 );
34}
35
36export default BackToListButton;