From cc186f8ad08bb81ad67995a1656868d952818499 Mon Sep 17 00:00:00 2001 From: Davenludd Date: Thu, 28 Mar 2024 12:16:35 +0100 Subject: [PATCH] Refactor handleProjectClick function to remove unused username parameter --- frontend/src/Components/DisplayUserProjects.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/frontend/src/Components/DisplayUserProjects.tsx b/frontend/src/Components/DisplayUserProjects.tsx index 426d266..29e4bcb 100644 --- a/frontend/src/Components/DisplayUserProjects.tsx +++ b/frontend/src/Components/DisplayUserProjects.tsx @@ -23,13 +23,8 @@ function DisplayUserProject(): JSX.Element { }; const handleProjectClick = async (projectName: string): Promise => { - const username = localStorage.getItem("username") ?? ""; const token = localStorage.getItem("accessToken") ?? ""; - const response = await api.checkIfProjectManager( - username, - projectName, - token, - ); + const response = await api.checkIfProjectManager(projectName, token); if (response.success) { if (response.data) { navigate(`/PMProjectPage/${projectName}`);