refactor(web): remove typescript
This commit is contained in:
@@ -4,30 +4,19 @@ import Card from '@mui/material/Card';
|
||||
import Box from '@mui/material/Box';
|
||||
import CardActionArea from '@mui/material/CardActionArea';
|
||||
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
|
||||
|
||||
import useFormatMessage from 'hooks/useFormatMessage';
|
||||
import AppIcon from 'components/AppIcon';
|
||||
import type { IApp } from 'types';
|
||||
|
||||
import { CardContent, Typography } from './style';
|
||||
|
||||
type AppRowProps = {
|
||||
application: IApp;
|
||||
url: string;
|
||||
};
|
||||
|
||||
const countTranslation = (value: React.ReactNode) => (
|
||||
const countTranslation = (value) => (
|
||||
<>
|
||||
<Typography variant="body1">{value}</Typography>
|
||||
<br />
|
||||
</>
|
||||
);
|
||||
|
||||
function AppRow(props: AppRowProps): React.ReactElement {
|
||||
function AppRow(props) {
|
||||
const formatMessage = useFormatMessage();
|
||||
const { name, primaryColor, iconUrl, connectionCount, flowCount } =
|
||||
props.application;
|
||||
|
||||
return (
|
||||
<Link to={props.url} data-test="app-row">
|
||||
<Card sx={{ mb: 1 }}>
|
||||
@@ -76,5 +65,4 @@ function AppRow(props: AppRowProps): React.ReactElement {
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
export default AppRow;
|
@@ -1,7 +1,6 @@
|
||||
import { styled } from '@mui/material/styles';
|
||||
import MuiCardContent from '@mui/material/CardContent';
|
||||
import MuiTypography from '@mui/material/Typography';
|
||||
|
||||
export const CardContent = styled(MuiCardContent)(({ theme }) => ({
|
||||
display: 'grid',
|
||||
gridTemplateRows: 'auto',
|
||||
@@ -9,7 +8,6 @@ export const CardContent = styled(MuiCardContent)(({ theme }) => ({
|
||||
gridColumnGap: theme.spacing(2),
|
||||
alignItems: 'center',
|
||||
}));
|
||||
|
||||
export const Typography = styled(MuiTypography)(() => ({
|
||||
'&.MuiTypography-h6': {
|
||||
textTransform: 'capitalize',
|
||||
@@ -17,7 +15,6 @@ export const Typography = styled(MuiTypography)(() => ({
|
||||
textAlign: 'center',
|
||||
display: 'inline-block',
|
||||
}));
|
||||
|
||||
export const DesktopOnlyBreakline = styled('br')(({ theme }) => ({
|
||||
[theme.breakpoints.down('sm')]: {
|
||||
display: 'none',
|
Reference in New Issue
Block a user