From e3c0b286b8306bba348fca5da82451c2d2d2a18f Mon Sep 17 00:00:00 2001 From: Fhj0607 Date: Fri, 1 May 2026 12:08:19 +0200 Subject: [PATCH] Assignment Progress now only renders when the subject has one or more assignments --- app/subject/viewDetailsSubject.tsx | 54 ++++++++++++++++-------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/app/subject/viewDetailsSubject.tsx b/app/subject/viewDetailsSubject.tsx index 030937d..5f55aec 100644 --- a/app/subject/viewDetailsSubject.tsx +++ b/app/subject/viewDetailsSubject.tsx @@ -324,35 +324,37 @@ export default function ViewDetailsSubject() { - - - - Assignment Progress - + {totalAssignments > 0 ? ( + + + + Assignment Progress + - - {completedAssignments}/{totalAssignments} + + {completedAssignments}/{totalAssignments} + + + + + + + + + {remainingAssignments === 0 + ? 'All assignments complete' + : `${remainingAssignments} assignment${ + remainingAssignments === 1 ? '' : 's' + } remaining`} - - - - - - - {remainingAssignments === 0 - ? 'All assignments complete' - : `${remainingAssignments} assignment${ - remainingAssignments === 1 ? '' : 's' - } remaining`} - - + ) : null} Last changed: {formatDateTime(subject.lastChanged)}