refactor(web): remove typescript

This commit is contained in:
Ali BARIN
2024-02-27 15:23:23 +00:00
parent 636870a075
commit b3ae2d2748
337 changed files with 2067 additions and 4997 deletions

View File

@@ -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',
)}
/>

View File

@@ -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',