Update UserViewTimeReportsPage to include username in Total Time In Project button link

This commit is contained in:
Davenludd 2024-04-14 15:58:27 +02:00
parent a25413affa
commit 482c732b3d

View file

@ -6,6 +6,7 @@ import Button from "../../Components/Button";
function UserViewTimeReportsPage(): JSX.Element { function UserViewTimeReportsPage(): JSX.Element {
const { projectName } = useParams(); const { projectName } = useParams();
const username = localStorage.getItem("username");
const content = ( const content = (
<> <>
@ -18,7 +19,7 @@ function UserViewTimeReportsPage(): JSX.Element {
const buttons = ( const buttons = (
<> <>
<Link to={`/viewStatistics/${projectName}`}> <Link to={`/viewStatistics/${projectName}/${username}`}>
<Button <Button
text="Total Time In Project" text="Total Time In Project"
onClick={(): void => { onClick={(): void => {