fix(enhanced-kanban): improve code readability and loading state visuals
- Refactored conditional statements for better clarity and consistency. - Enhanced loading state visuals by replacing static text with a dynamic skeleton loader, improving user experience during data fetching.
This commit is contained in:
@@ -127,9 +127,9 @@ const EnhancedKanbanBoardNativeDnD: React.FC<{ projectId: string }> = ({ project
|
||||
if (draggedTaskId) {
|
||||
setHoveredGroupId(groupId);
|
||||
}
|
||||
if(taskIdx === null) {
|
||||
if (taskIdx === null) {
|
||||
setHoveredTaskIdx(0);
|
||||
}else{
|
||||
} else {
|
||||
setHoveredTaskIdx(taskIdx);
|
||||
};
|
||||
};
|
||||
@@ -317,8 +317,11 @@ const EnhancedKanbanBoardNativeDnD: React.FC<{ projectId: string }> = ({ project
|
||||
<div className="enhanced-kanban-board">
|
||||
{loadingGroups ? (
|
||||
<Card>
|
||||
<div className="flex justify-center items-center py-8">
|
||||
<Skeleton active />
|
||||
<div className="flex flex-row gap-2 h-[600px] py-2">
|
||||
<div className="rounded bg-gray-200 dark:bg-gray-700 animate-pulse w-1/4" style={{ height: '60%' }} />
|
||||
<div className="rounded bg-gray-200 dark:bg-gray-700 animate-pulse w-1/4" style={{ height: '100%' }} />
|
||||
<div className="rounded bg-gray-200 dark:bg-gray-700 animate-pulse w-1/4" style={{ height: '80%' }} />
|
||||
<div className="rounded bg-gray-200 dark:bg-gray-700 animate-pulse w-1/4" style={{ height: '40%' }} />
|
||||
</div>
|
||||
</Card>
|
||||
) : taskGroups.length === 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user