Skip to content

Commit d011829

Browse files
committed
fix(insights): Guard detail page links when span.group is null
Don't show "View full query" link in QueryClippedBox when group is null — navigating to /spans/span/null is not useful.
1 parent e37778b commit d011829

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

static/app/views/insights/common/components/fullSpanDescription.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,20 @@ function QueryClippedBox({group, children}: TruncatedQueryClipBoxProps) {
117117

118118
return (
119119
<StyledClippedBox
120-
btnText={t('View full query')}
120+
btnText={group ? t('View full query') : undefined}
121121
clipHeight={500}
122-
buttonProps={{
123-
icon: <IconOpen />,
124-
onClick: () =>
125-
navigate({
126-
pathname: `${databaseURL}/spans/span/${group}`,
127-
query: {...location.query, isExpanded: true},
128-
}),
129-
}}
122+
buttonProps={
123+
group
124+
? {
125+
icon: <IconOpen />,
126+
onClick: () =>
127+
navigate({
128+
pathname: `${databaseURL}/spans/span/${group}`,
129+
query: {...location.query, isExpanded: true},
130+
}),
131+
}
132+
: undefined
133+
}
130134
>
131135
{children}
132136
</StyledClippedBox>

0 commit comments

Comments
 (0)