diff --git a/frontend/src/Components/NavButton.tsx b/frontend/src/Components/NavButton.tsx new file mode 100644 index 0000000..05b3e97 --- /dev/null +++ b/frontend/src/Components/NavButton.tsx @@ -0,0 +1,24 @@ +import { useNavigate } from "react-router-dom"; + +/** + * Renders a navigation button component for navigating to + * different page + * @returns The JSX element representing the navigation button. + */ +export default function NavButton(props: { + navTo: string; + label: string; +}): JSX.Element { + const navigate = useNavigate(); + const goBack = (): void => { + navigate(props.navTo); + }; + return ( + + ); +}