refactor: assert entry dates as string

This commit is contained in:
Ali BARIN
2023-10-26 15:40:11 +00:00
parent 3549fef71c
commit 9f8eb985e4
2 changed files with 8 additions and 4 deletions

View File

@@ -39,11 +39,15 @@ function ExecutionId(props: Pick<IExecution, 'id'>) {
}
function ExecutionDate(props: Pick<IExecution, 'createdAt'>) {
const createdAt = DateTime.fromMillis(parseInt(props.createdAt, 10));
const createdAt = DateTime.fromMillis(
parseInt(props.createdAt as string, 10)
);
const relativeCreatedAt = createdAt.toRelative();
return (
<Tooltip title={createdAt.toLocaleString(DateTime.DATETIME_FULL_WITH_SECONDS)}>
<Tooltip
title={createdAt.toLocaleString(DateTime.DATETIME_FULL_WITH_SECONDS)}
>
<Typography variant="body1" gutterBottom>
{relativeCreatedAt}
</Typography>