Refactor handleProjectClick function to remove unused username parameter
This commit is contained in:
parent
e589726ab2
commit
cc186f8ad0
1 changed files with 1 additions and 6 deletions
|
@ -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}`);
|
||||
|
|
Loading…
Reference in a new issue