Skip to content

Commit ba4b781

Browse files
scttcpertrillville
authored andcommitted
fix(ui): Remove unnecessary brackets in jsx (#63372)
1 parent c3f2d6f commit ba4b781

11 files changed

Lines changed: 61 additions & 79 deletions

File tree

static/app/components/alert.stories.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@ export default storyBook(Alert, story => {
3434
alert:
3535
</p>
3636
<Alert>
37-
{
38-
<Fragment>
39-
Sentry is cool!{' '}
40-
<ExternalLink href="https://sentry.io/welcome/">
41-
Learn more here.
42-
</ExternalLink>
43-
</Fragment>
44-
}
37+
Sentry is cool!{' '}
38+
<ExternalLink href="https://sentry.io/welcome/">Learn more here.</ExternalLink>
4539
</Alert>
4640
</Fragment>
4741
);

static/app/components/events/interfaces/threads.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export function Threads({
267267
title={getThreadStateHelpText(threadStateDisplay)}
268268
/>
269269
)}
270-
{<LockReason>{getLockReason(activeThread?.heldLocks)}</LockReason>}
270+
<LockReason>{getLockReason(activeThread?.heldLocks)}</LockReason>
271271
</ThreadStateWrapper>
272272
</EventDataSection>
273273
)}

static/app/components/feedback/list/feedbackListItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const FeedbackListItem = forwardRef<HTMLDivElement, Props>(
133133

134134
{hasReplayId && (
135135
<Tooltip title={t('Linked Replay')} containerDisplayMode="flex">
136-
{<IconPlay size="xs" />}
136+
<IconPlay size="xs" />
137137
</Tooltip>
138138
)}
139139

static/app/components/group/tagFacets/tagFacetsDistributionMeter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function TagFacetsDistributionMeter({
181181
{segment.name ?? <NotApplicableLabel>{t('n/a')}</NotApplicableLabel>}
182182
</LegendText>
183183
</Tooltip>
184-
{<LegendPercent>{`${pctLabel}%`}</LegendPercent>}
184+
<LegendPercent>{`${pctLabel}%`}</LegendPercent>
185185
</LegendRow>
186186
);
187187

static/app/components/onboardingWizard/modalTask.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function ModalTask({title}: Props) {
1010
return (
1111
<TaskCard>
1212
<Title>
13-
{<IconCheckmark isCircled color="successText" />}
13+
<IconCheckmark isCircled color="successText" />
1414
{title}
1515
</Title>
1616
</TaskCard>

static/app/views/issueDetails/actions/index.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -495,18 +495,16 @@ export function Actions(props: Props) {
495495
</ActionButton>
496496
) : (
497497
<Fragment>
498-
{
499-
<GuideAnchor target="issue_details_archive_button" position="bottom">
500-
<ArchiveActions
501-
className="hidden-xs"
502-
size="sm"
503-
isArchived={isIgnored}
504-
onUpdate={onUpdate}
505-
disabled={disabled}
506-
disableArchiveUntilOccurrence={!archiveUntilOccurrenceCap.enabled}
507-
/>
508-
</GuideAnchor>
509-
}
498+
<GuideAnchor target="issue_details_archive_button" position="bottom">
499+
<ArchiveActions
500+
className="hidden-xs"
501+
size="sm"
502+
isArchived={isIgnored}
503+
onUpdate={onUpdate}
504+
disabled={disabled}
505+
disableArchiveUntilOccurrence={!archiveUntilOccurrenceCap.enabled}
506+
/>
507+
</GuideAnchor>
510508
<GuideAnchor target="resolve" position="bottom" offset={20}>
511509
<ResolveActions
512510
disableResolveInRelease={!resolveInReleaseCap.enabled}

static/app/views/issueDetails/groupEventDetails/groupEventDetails.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,11 @@ function GroupEventDetails(props: GroupEventDetailsProps) {
122122
if (group.status === 'ignored') {
123123
return (
124124
<GroupStatusBannerWrapper>
125-
{
126-
<ArchivedBox
127-
substatus={group.substatus}
128-
statusDetails={group.statusDetails}
129-
organization={organization}
130-
/>
131-
}
125+
<ArchivedBox
126+
substatus={group.substatus}
127+
statusDetails={group.statusDetails}
128+
organization={organization}
129+
/>
132130
</GroupStatusBannerWrapper>
133131
);
134132
}

static/app/views/issueDetails/header.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,11 @@ function GroupHeader({
264264
<h3>
265265
<StyledEventOrGroupTitle data={group} />
266266
</h3>
267-
{
268-
<GroupStatusBadge
269-
status={group.status}
270-
substatus={group.substatus}
271-
fontSize="md"
272-
/>
273-
}
267+
<GroupStatusBadge
268+
status={group.status}
269+
substatus={group.substatus}
270+
fontSize="md"
271+
/>
274272
</TitleHeading>
275273
<StyledTagAndMessageWrapper>
276274
{group.level && <ErrorLevel level={group.level} size="11px" />}

static/app/views/issueList/actions/actionSet.tsx

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -246,23 +246,21 @@ function ActionSet({
246246
}}
247247
/>
248248
)}
249-
{
250-
<GuideAnchor
251-
target="issue_stream_archive_button"
252-
position="bottom"
249+
<GuideAnchor
250+
target="issue_stream_archive_button"
251+
position="bottom"
252+
disabled={ignoreDisabled}
253+
>
254+
<ArchiveActions
255+
onUpdate={onUpdate}
256+
shouldConfirm={onShouldConfirm(ConfirmAction.IGNORE)}
257+
confirmMessage={() =>
258+
confirm({action: ConfirmAction.IGNORE, canBeUndone: true})
259+
}
260+
confirmLabel={label('archive')}
253261
disabled={ignoreDisabled}
254-
>
255-
<ArchiveActions
256-
onUpdate={onUpdate}
257-
shouldConfirm={onShouldConfirm(ConfirmAction.IGNORE)}
258-
confirmMessage={() =>
259-
confirm({action: ConfirmAction.IGNORE, canBeUndone: true})
260-
}
261-
confirmLabel={label('archive')}
262-
disabled={ignoreDisabled}
263-
/>
264-
</GuideAnchor>
265-
}
262+
/>
263+
</GuideAnchor>
266264
{!nestMergeAndReview && (
267265
<ReviewAction disabled={!canMarkReviewed} onUpdate={onUpdate} />
268266
)}

static/app/views/monitors/components/monitorCheckIns.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function MonitorCheckIns({monitor, monitorEnvs, orgSlug}: Props) {
133133
/>
134134
}
135135
>
136-
{<DateTime date={checkIn.dateCreated} timeZone seconds />}
136+
<DateTime date={checkIn.dateCreated} timeZone seconds />
137137
</Tooltip>
138138
</div>
139139
) : (
@@ -156,19 +156,17 @@ function MonitorCheckIns({monitor, monitorEnvs, orgSlug}: Props) {
156156
organization={organization}
157157
key={id}
158158
>
159-
{
160-
<StyledShortId
161-
shortId={shortId}
162-
avatar={
163-
<ProjectBadge
164-
project={monitor.project}
165-
hideName
166-
avatarSize={12}
167-
/>
168-
}
169-
to={`/issues/${id}`}
170-
/>
171-
}
159+
<StyledShortId
160+
shortId={shortId}
161+
avatar={
162+
<ProjectBadge
163+
project={monitor.project}
164+
hideName
165+
avatarSize={12}
166+
/>
167+
}
168+
to={`/issues/${id}`}
169+
/>
172170
</QuickContextHovercard>
173171
))}
174172
</IssuesContainer>

0 commit comments

Comments
 (0)