Skip to content

Commit 5d2f28e

Browse files
authored
ref(vitals): Restructure vitals cards (#23056)
Restructure vitals cards to prepare for the upcoming backend cards. This restructure lifts the chart component of the cards to be customizable via a prop and simplifies the card for easier reuse.
1 parent a81b5ad commit 5d2f28e

File tree

7 files changed

+208
-309
lines changed

7 files changed

+208
-309
lines changed

src/sentry/static/sentry/app/views/performance/landing/content.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
LANDING_DISPLAYS,
2727
LandingDisplayField,
2828
} from './utils';
29-
import VitalsCards from './vitalsCards';
29+
import {FrontendCards} from './vitalsCards';
3030

3131
type Props = {
3232
organization: Organization;
@@ -133,11 +133,11 @@ class LandingContent extends React.Component<Props, State> {
133133
</DropdownControl>
134134
</ProjectTypeDropdown>
135135
</SearchContainer>
136-
<VitalsCards
136+
<FrontendCards
137137
eventView={frontendEventView}
138138
organization={organization}
139139
location={location}
140-
isAlwaysShown
140+
projects={projects}
141141
/>
142142
{currentLandingDisplay.field === LandingDisplayField.FRONTEND && (
143143
<FrontendDisplay
@@ -173,10 +173,12 @@ class LandingContent extends React.Component<Props, State> {
173173
onSearch={handleSearch}
174174
/>
175175
<Feature features={['performance-vitals-overview']}>
176-
<VitalsCards
176+
<FrontendCards
177177
eventView={eventView}
178178
organization={organization}
179179
location={location}
180+
projects={projects}
181+
frontendOnly
180182
/>
181183
</Feature>
182184
<Charts

0 commit comments

Comments
 (0)