Refactor handleProjectClick function to remove unused username parameter

This commit is contained in:
Davenludd 2024-03-28 12:16:35 +01:00
parent e589726ab2
commit cc186f8ad0

View file

@ -23,13 +23,8 @@ function DisplayUserProject(): JSX.Element {
};
const handleProjectClick = async (projectName: string): Promise<void> => {
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}`);