Skip to content

Commit 4803f36

Browse files
monikakusterkresimir-coko
authored andcommitted
4872 refactor
1 parent ba5d0d6 commit 4803f36

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

client/src/pages/automation/workflow-executions/components/WorkflowExecutionsTable.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,15 @@ const WorkflowExecutionsTable = ({data}: {data: WorkflowExecution[]}) => {
6565
header: 'Start date',
6666
}),
6767
columnHelper.accessor((row) => row.job, {
68-
cell: (info) => (
69-
<>
70-
{info.getValue()?.endDate &&
71-
`${info.getValue()?.endDate?.toLocaleDateString()} ${info
72-
.getValue()
73-
?.endDate?.toLocaleTimeString()}`}
74-
</>
75-
),
68+
cell: (info) => {
69+
const {endDate} = info.getValue();
70+
71+
if (!endDate) {
72+
return <></>;
73+
}
74+
75+
return <>{`${endDate.toLocaleDateString()} ${endDate.toLocaleTimeString()}`}</>;
76+
},
7677
header: 'End date',
7778
}),
7879
columnHelper.accessor((row) => row.job, {

0 commit comments

Comments
 (0)