import { useNavigate } from "react-router";
import './Home.css'

export const Home = () => {
    const navigate = useNavigate();

    const submitHandler = (path: string) => {
        navigate(path);
    };

    return (
        <div>
            <button onClick={() => submitHandler("/departure")}>Departure</button>
            <button onClick={() => submitHandler("/arrival")}>Arrival</button>
        </div>
    );
};
