import * as React from 'react';
import { Link } from 'react-router-dom';
import Card from '@mui/material/Card';
import CardActionArea from '@mui/material/CardActionArea';
import Chip from '@mui/material/Chip';
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
import { DateTime } from 'luxon';
import type { IExecution } from '@automatisch/types';
import * as URLS from 'config/urls';
import useFormatMessage from 'hooks/useFormatMessage';
import FlowAppIcons from 'components/FlowAppIcons';
import { Apps, CardContent, ArrowContainer, Title, Typography } from './style';
type ExecutionRowProps = {
execution: IExecution;
};
export default function ExecutionRow(
props: ExecutionRowProps
): React.ReactElement {
const formatMessage = useFormatMessage();
const { execution } = props;
const { flow } = execution;
const updatedAt = DateTime.fromMillis(parseInt(execution.updatedAt, 10));
const relativeUpdatedAt = updatedAt.toRelative();
return (
{flow.name}
{formatMessage('execution.updatedAt', {
datetime: relativeUpdatedAt,
})}
{execution.testRun && (
)}
theme.palette.primary.main }}
/>
);
}