//info: User project menu component to display the user project menu where the user can navigate to
//existing time reports in a project and create a new time report
import { useParams, Link } from "react-router-dom";
import { JSX } from "react/jsx-runtime";

/**
 * Renders the menu for a specific project for the user.
 * It provides options to view existing time reports and create new ones.
 * @returns {JSX.Element} The JSX element representing the user project menu.
 */
function UserProjectMenu(): JSX.Element {
  const { projectName } = useParams();

  return (
    <>
      <h1 className="font-bold text-[30px] mb-[20px]">{projectName}</h1>
      <div className="border-4 border-black bg-white flex flex-col items-center justify-center min-h-[65vh] h-fit w-[50vw] rounded-3xl content-center overflow-scroll space-y-[10vh] p-[30px]">
        <Link to={`/timeReports/${projectName}/`}>
          <h1 className="font-bold underline text-[30px] cursor-pointer">
            Your Time Reports
          </h1>
        </Link>
        <Link to={`/newTimeReport/${projectName}`}>
          <h1 className="font-bold underline text-[30px] cursor-pointer">
            New Time Report
          </h1>
        </Link>
      </div>
    </>
  );
}
export default UserProjectMenu;
