Fix hide calender icon if no deadline on task (#7465)

Closes #7402 


![image](https://github.com/user-attachments/assets/46912a22-8dfb-4065-a877-de179fd796d3)

Ensured that the calendar icon is only visible when a deadline is
assigned

---------

Co-authored-by: ehconitin <nitinkoche03@gmail.com>
This commit is contained in:
Vardhaman Bhandari 2024-10-10 13:04:25 +05:30 committed by GitHub
parent e45e45d8b2
commit c13b29a6ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -130,6 +130,14 @@ export const TaskRow = ({ task }: { task: Task }) => {
</StyledTaskBody>
</StyledLeftSideContainer>
<StyledRightSideContainer>
{task.dueAt && (
<StyledDueDate
isPast={hasDatePassed(task.dueAt) && task.status === 'TODO'}
>
<IconCalendar size={theme.icon.size.md} />
{beautifyExactDate(task.dueAt)}
</StyledDueDate>
)}
{TaskTargetsContextProvider && (
<TaskTargetsContextProvider>
<ActivityTargetsInlineCell
@ -141,14 +149,6 @@ export const TaskRow = ({ task }: { task: Task }) => {
/>
</TaskTargetsContextProvider>
)}
<StyledDueDate
isPast={
!!task.dueAt && hasDatePassed(task.dueAt) && task.status === 'TODO'
}
>
<IconCalendar size={theme.icon.size.md} />
{task.dueAt && beautifyExactDate(task.dueAt)}
</StyledDueDate>
</StyledRightSideContainer>
</StyledContainer>
);