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'>) {
|
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();
|
const relativeCreatedAt = createdAt.toRelative();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={createdAt.toLocaleString(DateTime.DATETIME_FULL_WITH_SECONDS)}>
|
<Tooltip
|
||||||
|
title={createdAt.toLocaleString(DateTime.DATETIME_FULL_WITH_SECONDS)}
|
||||||
|
>
|
||||||
<Typography variant="body1" gutterBottom>
|
<Typography variant="body1" gutterBottom>
|
||||||
{relativeCreatedAt}
|
{relativeCreatedAt}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
@@ -65,8 +65,8 @@ export default function FlowRow(props: FlowRowProps): React.ReactElement {
|
|||||||
setAnchorEl(contextButtonRef.current);
|
setAnchorEl(contextButtonRef.current);
|
||||||
};
|
};
|
||||||
|
|
||||||
const createdAt = DateTime.fromMillis(parseInt(flow.createdAt, 10));
|
const createdAt = DateTime.fromMillis(parseInt(flow.createdAt as string, 10));
|
||||||
const updatedAt = DateTime.fromMillis(parseInt(flow.updatedAt, 10));
|
const updatedAt = DateTime.fromMillis(parseInt(flow.updatedAt as string, 10));
|
||||||
const isUpdated = updatedAt > createdAt;
|
const isUpdated = updatedAt > createdAt;
|
||||||
const relativeCreatedAt = createdAt.toRelative();
|
const relativeCreatedAt = createdAt.toRelative();
|
||||||
const relativeUpdatedAt = updatedAt.toRelative();
|
const relativeUpdatedAt = updatedAt.toRelative();
|
||||||
|
Reference in New Issue
Block a user