1import { useHistory } from "react-router-dom";
2
3function HomeButton() {
4 let history = useHistory();
5
6 function handleClick() {
7 history.push("/home");
8 }
9
10 return (
11 <Button type="button" onClick={handleClick}>
12 Go home
13 </Button>
14 );
15}