feat: introduce propTypes
This commit is contained in:

committed by
Ali BARIN

parent
bfc7d5d0dd
commit
7afdf43872
@@ -1,4 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Link } from 'react-router-dom';
|
||||
import Card from '@mui/material/Card';
|
||||
import Box from '@mui/material/Box';
|
||||
@@ -6,13 +7,16 @@ import CardActionArea from '@mui/material/CardActionArea';
|
||||
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
|
||||
import useFormatMessage from 'hooks/useFormatMessage';
|
||||
import AppIcon from 'components/AppIcon';
|
||||
import { AppPropType } from 'propTypes/propTypes';
|
||||
import { CardContent, Typography } from './style';
|
||||
|
||||
const countTranslation = (value) => (
|
||||
<>
|
||||
<Typography variant="body1">{value}</Typography>
|
||||
<br />
|
||||
</>
|
||||
);
|
||||
|
||||
function AppRow(props) {
|
||||
const formatMessage = useFormatMessage();
|
||||
const { name, primaryColor, iconUrl, connectionCount, flowCount } =
|
||||
@@ -65,4 +69,10 @@ function AppRow(props) {
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
AppRow.propTypes = {
|
||||
application: AppPropType.isRequired,
|
||||
url: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default AppRow;
|
||||
|
Reference in New Issue
Block a user