Fixed getting the username and removed comment

This commit is contained in:
Peter KW 2024-03-18 18:31:58 +01:00
parent d692165f99
commit 83e781c877

View file

@ -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>