Fixed: Prevent brief display of "No activities available" before task data loads
- Improved conditional rendering logic in WorkArea component - Ensured "No activities" message only shows after data is loaded and empty - Avoided flicker caused by initial undefined or empty task list state
This commit is contained in:
parent
2a74333870
commit
6bf33b27a0
@ -122,9 +122,11 @@ const WorkArea = ({ workArea, floor, forBuilding }) => {
|
||||
aria-labelledby={`heading-${workArea.id}`}
|
||||
>
|
||||
<div className="accordion-body px-1">
|
||||
{isLoading ? (
|
||||
{isLoading || ProjectTaskList === undefined ? (
|
||||
<div className="text-center py-2 text-muted">Loading activities...</div>
|
||||
) : ProjectTaskList?.length > 0 ? (
|
||||
) : ProjectTaskList?.length === 0 ? (
|
||||
<div className="text-center py-2 text-muted">Loading activities...</div>
|
||||
):ProjectTaskList?.length > 0 ? (
|
||||
<table className="table table-sm mx-1">
|
||||
<thead>
|
||||
<tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user