import * as React from 'react'; import { DateTime } from 'luxon'; import Stack from '@mui/material/Stack'; import Box from '@mui/material/Box'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; import type { IExecution } from 'types'; import useFormatMessage from 'hooks/useFormatMessage'; type ExecutionHeaderProps = { execution: IExecution; }; function ExecutionName(props: Pick) { return ( {props.name} ); } function ExecutionId(props: Pick) { const formatMessage = useFormatMessage(); const id = ( {props.id} ); return ( {formatMessage('execution.id', { id })} ); } function ExecutionDate(props: Pick) { const createdAt = DateTime.fromMillis( parseInt(props.createdAt as string, 10) ); const relativeCreatedAt = createdAt.toRelative(); return ( {relativeCreatedAt} ); } export default function ExecutionHeader( props: ExecutionHeaderProps ): React.ReactElement { const { execution } = props; if (!execution) return ; return ( ); }