diff --git a/frontend/src/Components/ChangeUsername.tsx b/frontend/src/Components/ChangeUsername.tsx index 04abc26..247c2fb 100644 --- a/frontend/src/Components/ChangeUsername.tsx +++ b/frontend/src/Components/ChangeUsername.tsx @@ -13,9 +13,10 @@ function ChangeUsername(): JSX.Element { const handleSubmit = async (): Promise => { try { // Call the API function to change the username + const token = localStorage.getItem("accessToken") ?? ""; const response = await api.changeUserName( { prevName: "currentName", newName: newUsername }, - "token", + token, ); if (response.success) { // Optionally, add a success message or redirect the user