refactor: assert entry dates as string
This commit is contained in:
@@ -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>
|
||||
|
@@ -65,8 +65,8 @@ export default function FlowRow(props: FlowRowProps): React.ReactElement {
|
||||
setAnchorEl(contextButtonRef.current);
|
||||
};
|
||||
|
||||
const createdAt = DateTime.fromMillis(parseInt(flow.createdAt, 10));
|
||||
const updatedAt = DateTime.fromMillis(parseInt(flow.updatedAt, 10));
|
||||
const createdAt = DateTime.fromMillis(parseInt(flow.createdAt as string, 10));
|
||||
const updatedAt = DateTime.fromMillis(parseInt(flow.updatedAt as string, 10));
|
||||
const isUpdated = updatedAt > createdAt;
|
||||
const relativeCreatedAt = createdAt.toRelative();
|
||||
const relativeUpdatedAt = updatedAt.toRelative();
|
||||
|
Reference in New Issue
Block a user