xxxxxxxxxx
import { Button } from "@mui/material";
<Button href={'/login'}>
Login
</Button>
xxxxxxxxxx
import Button from "@material-ui/core/Button";
import { Link } from "react-router-dom";
//...
<Button component={Link} to="/about" variant="contained" color="primary">
About Page
</Button>
xxxxxxxxxx
import React from 'react';
import { Button } from '@mui/material';
import { Link } from 'react-router-dom';
const LinkButton = ({ to, children }) => {
return (
<Button component={Link} to={to} variant="contained" color="primary">
{children}
</Button>
);
};
export default LinkButton;