Fixed getting the username and removed comment
This commit is contained in:
parent
d692165f99
commit
83e781c877
1 changed files with 1 additions and 2 deletions
|
@ -9,7 +9,7 @@ const UserProjectListAdmin: React.FC = () => {
|
|||
const fetchProjects = async (): Promise<void> => {
|
||||
try {
|
||||
const token = localStorage.getItem("accessToken") ?? "";
|
||||
const username = getUsernameFromContext(); // Assuming you have a function to get the username from your context
|
||||
const username = localStorage.getItem("username") ?? "";
|
||||
|
||||
const response = await api.getUserProjects(username, token);
|
||||
if (response.success) {
|
||||
|
@ -32,7 +32,6 @@ const UserProjectListAdmin: React.FC = () => {
|
|||
{projects.map((project) => (
|
||||
<li key={project.id}>
|
||||
<span>{project.name}</span>
|
||||
{/* Add any additional project details you want to display */}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue