Add username retrieval from local storage

This commit is contained in:
Mattias 2024-04-02 16:21:23 +02:00
parent 762a1b7368
commit 8d6da684bf

View file

@ -22,6 +22,7 @@ export default function GetWeeklyReport(): JSX.Element {
projectName: string;
fetchedWeek: string;
}>();
const username = localStorage.getItem("userName") ?? "";
console.log(projectName, fetchedWeek);
useEffect(() => {
@ -62,7 +63,7 @@ export default function GetWeeklyReport(): JSX.Element {
const handleUpdateWeeklyReport = async (): Promise<void> => {
const updateWeeklyReport: UpdateWeeklyReport = {
userName: "user2",
userName: username,
projectName: projectName ?? "",
week,
developmentTime,