Skip to content

Commit

Permalink
add peer dependency
Browse files Browse the repository at this point in the history
avoid calling the same function multiple times
  • Loading branch information
nabuskey committed Aug 2, 2023
1 parent 76a8230 commit ddc975a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
"react-router-dom": "6.0.0-beta.0 || ^6.3.0",
"yaml": "^2.3.1"
},
"peerDependencies": {
"react": "^16.13.1 || ^17.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.22.9",
"@backstage/core-app-api": "^1.9.0",
Expand Down
7 changes: 4 additions & 3 deletions src/components/DetailedDrawer/DrawerOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,24 @@ const upperCaseFirstChar = (s: string) => {
};

export const DrawerOverview = (props: { sparkApp: ApacheSpark }) => {
const data = generateMetadata(props.sparkApp)
return (
<div className={useStyles().content}>
<InfoCard title="Apache Spark Application">
<StructuredMetadataTable
metadata={generateMetadata(props.sparkApp).app}
metadata={data.app}
options={{ titleFormat: upperCaseFirstChar }}
/>
</InfoCard>
<InfoCard title="Driver">
<StructuredMetadataTable
metadata={generateMetadata(props.sparkApp).driver}
metadata={data.driver}
options={{ titleFormat: upperCaseFirstChar }}
/>
</InfoCard>
<InfoCard title="Executors">
<StructuredMetadataTable
metadata={generateMetadata(props.sparkApp).executor}
metadata={data.executor}
options={{ titleFormat: upperCaseFirstChar }}
/>
</InfoCard>
Expand Down

0 comments on commit ddc975a

Please sign in to comment.