@@ -23,15 +23,12 @@ import { ScorecardInfo } from '../ScorecardsInfo';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
import { techInsightsApiRef } from '../../api/TechInsightsApi';
|
||||
|
||||
export const ScorecardsCard = ({
|
||||
title,
|
||||
description,
|
||||
checksId,
|
||||
}: {
|
||||
export const ScorecardsCard = (props: {
|
||||
title?: string;
|
||||
description?: string;
|
||||
checksId?: string[];
|
||||
}) => {
|
||||
const { title, description, checksId } = props;
|
||||
const api = useApi(techInsightsApiRef);
|
||||
const { namespace, kind, name } = useParams();
|
||||
const { value, loading, error } = useAsync(
|
||||
|
||||
@@ -31,15 +31,12 @@ const useStyles = makeStyles(() => ({
|
||||
},
|
||||
}));
|
||||
|
||||
export const ScorecardsContent = ({
|
||||
title,
|
||||
description,
|
||||
checksId,
|
||||
}: {
|
||||
export const ScorecardsContent = (props: {
|
||||
title?: string;
|
||||
description?: string;
|
||||
checksId?: string[];
|
||||
}) => {
|
||||
const { title, description, checksId } = props;
|
||||
const classes = useStyles();
|
||||
const api = useApi(techInsightsApiRef);
|
||||
const { namespace, kind, name } = useParams();
|
||||
|
||||
@@ -30,15 +30,9 @@ const useStyles = makeStyles((theme: BackstageTheme) => ({
|
||||
},
|
||||
}));
|
||||
|
||||
type Checks = {
|
||||
checks: CheckResult[];
|
||||
title?: string;
|
||||
description?: string;
|
||||
};
|
||||
|
||||
const infoCard = (
|
||||
title: Checks['title'],
|
||||
description: Checks['description'],
|
||||
title: string | undefined,
|
||||
description: string | undefined,
|
||||
className: string,
|
||||
element: JSX.Element,
|
||||
) => (
|
||||
@@ -54,7 +48,12 @@ const infoCard = (
|
||||
</Grid>
|
||||
);
|
||||
|
||||
export const ScorecardInfo = ({ checks, title, description }: Checks) => {
|
||||
export const ScorecardInfo = (props: {
|
||||
checks: CheckResult[];
|
||||
title?: string;
|
||||
description?: string;
|
||||
}) => {
|
||||
const { checks, title, description } = props;
|
||||
const classes = useStyles();
|
||||
const api = useApi(techInsightsApiRef);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user