diff --git a/frontend/src/Components/PMProjectMenu.tsx b/frontend/src/Components/PMProjectMenu.tsx index ce7c5c5..7bdefac 100644 --- a/frontend/src/Components/PMProjectMenu.tsx +++ b/frontend/src/Components/PMProjectMenu.tsx @@ -1,6 +1,11 @@ import { Link, useParams } from "react-router-dom"; import { JSX } from "react/jsx-runtime"; +/** + * Handles the rendering of the PM Project Menu. + * @param {string} projectName - The name of the project. + * @returns {JSX.Element} The JSX element representing the PM Project Menu. + */ function PMProjectMenu(): JSX.Element { const { projectName } = useParams(); return ( diff --git a/frontend/src/Components/UserInfoModal.tsx b/frontend/src/Components/UserInfoModal.tsx index a22ef01..24f6a56 100644 --- a/frontend/src/Components/UserInfoModal.tsx +++ b/frontend/src/Components/UserInfoModal.tsx @@ -3,6 +3,14 @@ import Button from "./Button"; import DeleteUser from "./DeleteUser"; import UserProjectListAdmin from "./UserProjectListAdmin"; +/** + * Component representing a modal to display user information. + * @param {object} props - Component properties. + * @param {boolean} props.isVisible - Determines if the modal is visible. + * @param {string} props.username - The username to display. + * @param {() => void} props.onClose - Function to handle closing the modal. + * @returns {JSX.Element} The JSX element representing the UserInfoModal. + */ function UserInfoModal(props: { isVisible: boolean; username: string; diff --git a/frontend/src/Components/UserProjectListAdmin.tsx b/frontend/src/Components/UserProjectListAdmin.tsx index 1b7b923..0130d10 100644 --- a/frontend/src/Components/UserProjectListAdmin.tsx +++ b/frontend/src/Components/UserProjectListAdmin.tsx @@ -2,6 +2,10 @@ import { useEffect, useState } from "react"; import { api } from "../API/API"; import { Project } from "../Types/goTypes"; +/** + * Component for displaying a list of projects associated with the current user. + * @returns {JSX.Element} The JSX element representing the UserProjectListAdmin component. + */ function UserProjectListAdmin(): JSX.Element { const [projects, setProjects] = useState([]); diff --git a/frontend/src/Components/UserProjectMenu.tsx b/frontend/src/Components/UserProjectMenu.tsx index e307e90..39a0e9f 100644 --- a/frontend/src/Components/UserProjectMenu.tsx +++ b/frontend/src/Components/UserProjectMenu.tsx @@ -4,9 +4,9 @@ import { useParams, Link } from "react-router-dom"; import { JSX } from "react/jsx-runtime"; /** - * Renders the user project menu component. - * - * @returns JSX.Element representing the user project menu. + * 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();