import React from "react"; import { ProjectHours } from "./UserWorkspaceWrapper"; import { Box, Card, CardContent, Chip, Grid, Typography } from "@mui/material"; import { useTranslation } from "react-i18next"; import { manhourFormatter } from "@/app/utils/formatUtil"; interface Props { projects: ProjectHours[]; } const ProjectGrid: React.FC = ({ projects }) => { const { t } = useTranslation("home"); return ( {projects.map((project, idx) => ( {project.code} {project.name} {/* Hours Spent */} {t("Hours Spent:")} {t("Normal")} {manhourFormatter.format(project.hoursSpent)} {t("(Others)")} {`(${manhourFormatter.format( project.hoursSpentOther, )})`} {/* Hours Allocated */} {t("Hours Allocated:")} {t("Normal")} {manhourFormatter.format(project.hoursAllocated)} {t("(Others)")} {`(${manhourFormatter.format( project.hoursAllocatedOther, )})`} ))} ); }; export default ProjectGrid;