From 31d3cbfba6dfbc2b026547460a46cf4c7fd88c85 Mon Sep 17 00:00:00 2001 From: Chris Sanden Date: Sat, 2 May 2026 20:05:22 +0200 Subject: [PATCH] fixded bug where active sprint would stop upcoming tasks from showing on dashboard --- app/(tabs)/index.tsx | 134 +++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 68 deletions(-) diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx index 47df45c..90dc217 100644 --- a/app/(tabs)/index.tsx +++ b/app/(tabs)/index.tsx @@ -436,75 +436,73 @@ export default function HomeScreen() { ) : ( - <> - - No active sprint right now. - - - - - Tasks with upcoming deadlines - - - {upcomingDeadlineTasks.length > 0 ? ( - upcomingDeadlineTasks.map((task) => ( - - router.push({ - pathname: '/task/viewDetailsTask', - params: { tId: task.tId }, - }) - } - > - {task.title} - {task.description ? ( - - {task.description} - - ) : null} - - {task.subjectTitle} • {task.assignmentTitle} • {formatDate(task.deadline)} - - - { - event.stopPropagation(); - Alert.alert( - 'Complete task', - 'Mark this task as completed?', - [ - { - text: 'Cancel', - style: 'cancel', - }, - { - text: 'Complete', - onPress: () => { - void handleTaskCompletion(task); - }, - }, - ] - ); - }} - > - - {completingTaskId === task.tId ? 'Completing...' : 'Mark as completed'} - - - - )) - ) : ( - No upcoming task deadlines. - )} - - + + No active sprint right now. + )} + + + + Tasks with upcoming deadlines + + + {upcomingDeadlineTasks.length > 0 ? ( + upcomingDeadlineTasks.map((task) => ( + + router.push({ + pathname: '/task/viewDetailsTask', + params: { tId: task.tId }, + }) + } + > + {task.title} + {task.description ? ( + + {task.description} + + ) : null} + + {task.subjectTitle} • {task.assignmentTitle} • {formatDate(task.deadline)} + + + { + event.stopPropagation(); + Alert.alert( + 'Complete task', + 'Mark this task as completed?', + [ + { + text: 'Cancel', + style: 'cancel', + }, + { + text: 'Complete', + onPress: () => { + void handleTaskCompletion(task); + }, + }, + ] + ); + }} + > + + {completingTaskId === task.tId ? 'Completing...' : 'Mark as completed'} + + + + )) + ) : ( + No upcoming task deadlines. + )} + );