diff --git a/frontend/react-app/src/components/LockUnlockTask.jsx b/frontend/react-app/src/components/LockUnlockTask.jsx
index a5ba4d2..af7ffa2 100644
--- a/frontend/react-app/src/components/LockUnlockTask.jsx
+++ b/frontend/react-app/src/components/LockUnlockTask.jsx
@@ -12,11 +12,13 @@ function LockUnlockTask({ initialIsLocked, taskId }) {
const unlock = await unlockTask(taskId);
if (unlock) {
setIsLocked(false);
+ window.location.reload();
}
} else {
const lock = await lockTask(taskId);
if (lock) {
setIsLocked(true);
+ window.location.reload();
}
}
} catch (error) {
diff --git a/frontend/react-app/src/pages/MyTasks.jsx b/frontend/react-app/src/pages/MyTasks.jsx
index 721cc37..b30ffaa 100644
--- a/frontend/react-app/src/pages/MyTasks.jsx
+++ b/frontend/react-app/src/pages/MyTasks.jsx
@@ -32,7 +32,7 @@ function mapTaskItem(taskItem) {
...baseItem,
status: taskItem.status,
priority: taskItem.priority,
- isLocked: taskItem.isLocked.toString()
+ isLocked: !!taskItem.isLocked
};
});
@@ -124,11 +124,7 @@ const headerAndAccessors = [
return isAdmin ? (
) : (
- isLocked ? (
-
- ) : (
-
- )
+ isLocked ? '🔒' : '🔓'
);
},
}