feat: add pull requests widget to overview page of the component

This commit is contained in:
lewtakm
2020-10-12 13:44:09 +02:00
parent e3f4fdbad7
commit 69d50967e6
@@ -54,6 +54,10 @@ import {
LastLighthouseAuditCard,
isPluginApplicableToEntity as isLighthouseAvailable,
} from '@backstage/plugin-lighthouse/';
import {
isPluginApplicableToEntity as isPullRequestsAvailable,
PullRequestsStatsCard,
} from '@roadiehq/backstage-plugin-github-pull-requests';
const CICDSwitcher = ({ entity }: { entity: Entity }) => {
// This component is just an example of how you can implement your company's logic in entity page.
@@ -125,6 +129,11 @@ const OverviewContent = ({ entity }: { entity: Entity }) => (
<LastLighthouseAuditCard />
</Grid>
)}
{isPullRequestsAvailable(entity) && (
<Grid item sm={4}>
<PullRequestsStatsCard entity={entity} />
</Grid>
)}
</Grid>
);