refactor(web): remove typescript
This commit is contained in:
@@ -5,29 +5,16 @@ 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 '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 {
|
||||
export default function ExecutionRow(props) {
|
||||
const formatMessage = useFormatMessage();
|
||||
const { execution } = props;
|
||||
const { flow } = execution;
|
||||
|
||||
const createdAt = DateTime.fromMillis(
|
||||
parseInt(execution.createdAt as string, 10)
|
||||
);
|
||||
const createdAt = DateTime.fromMillis(parseInt(execution.createdAt, 10));
|
||||
const relativeCreatedAt = createdAt.toRelative();
|
||||
|
||||
return (
|
||||
<Link to={URLS.EXECUTION(execution.id)} data-test="execution-row">
|
||||
<Card sx={{ mb: 1 }}>
|
||||
@@ -65,7 +52,7 @@ export default function ExecutionRow(
|
||||
label={formatMessage(
|
||||
execution.status === 'success'
|
||||
? 'execution.statusSuccess'
|
||||
: 'execution.statusFailure'
|
||||
: 'execution.statusFailure',
|
||||
)}
|
||||
/>
|
||||
|
@@ -3,7 +3,6 @@ import MuiCardContent from '@mui/material/CardContent';
|
||||
import MuiBox from '@mui/material/Box';
|
||||
import MuiStack from '@mui/material/Stack';
|
||||
import MuiTypography from '@mui/material/Typography';
|
||||
|
||||
export const CardContent = styled(MuiCardContent)(({ theme }) => ({
|
||||
display: 'grid',
|
||||
gridTemplateRows: 'auto',
|
||||
@@ -22,14 +21,12 @@ export const CardContent = styled(MuiCardContent)(({ theme }) => ({
|
||||
gridTemplateRows: 'auto auto',
|
||||
},
|
||||
}));
|
||||
|
||||
export const Apps = styled(MuiStack)(() => ({
|
||||
gridArea: 'apps',
|
||||
}));
|
||||
export const Title = styled(MuiStack)(() => ({
|
||||
gridArea: 'title',
|
||||
}));
|
||||
|
||||
export const ArrowContainer = styled(MuiBox)(() => ({
|
||||
flexDirection: 'row',
|
||||
display: 'flex',
|
||||
@@ -42,7 +39,6 @@ export const Typography = styled(MuiTypography)(() => ({
|
||||
width: '100%',
|
||||
maxWidth: '85%',
|
||||
}));
|
||||
|
||||
export const DesktopOnlyBreakline = styled('br')(({ theme }) => ({
|
||||
[theme.breakpoints.down('sm')]: {
|
||||
display: 'none',
|
Reference in New Issue
Block a user