Made a back button component since we will have one on almost every page
This commit is contained in:
parent
69b0318eb0
commit
44aea9b765
1 changed files with 18 additions and 0 deletions
18
frontend/src/Components/BackButton.tsx
Normal file
18
frontend/src/Components/BackButton.tsx
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
function BackButton(): JSX.Element {
|
||||
const navigate = useNavigate();
|
||||
const goBack = (): void => {
|
||||
navigate(-1);
|
||||
};
|
||||
return (
|
||||
<button
|
||||
onClick={goBack}
|
||||
className="inline-block py-1 px-8 font-bold bg-orange-500 text-white border-2 border-black rounded-full cursor-pointer mt-5 mb-5 transition-colors duration-10 hover:bg-orange-600 hover:text-gray-300 font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 4vh;"
|
||||
>
|
||||
Back
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
export default BackButton;
|
Loading…
Reference in a new issue