Skip to content

Commit 4c9059c

Browse files
committed
breadcrumbs: fix prop bleed
1 parent be5c9b8 commit 4c9059c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

static/app/components/breadcrumbs.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@ function BreadCrumbItem(props: BreadCrumbItemProps) {
100100
</Text>
101101
</BreadcrumbLink>
102102
) : (
103-
<Text ellipsis variant={props.variant} {...styleProps}>
103+
<Text
104+
ellipsis
105+
variant={props.variant}
106+
data-test-id="breadcrumb-item"
107+
{...styleProps}
108+
>
104109
{props.crumb.label}
105110
</Text>
106111
);
@@ -115,9 +120,10 @@ interface BreadcrumbLinkProps extends LinkProps {
115120
}
116121

117122
function BreadcrumbLink(props: BreadcrumbLinkProps) {
118-
if (props.preservePageFilters) {
119-
return <GlobalSelectionLink {...props} />;
123+
const {preservePageFilters, ...rest} = props;
124+
if (preservePageFilters) {
125+
return <GlobalSelectionLink {...rest} />;
120126
}
121127

122-
return <Link {...props} />;
128+
return <Link {...rest} />;
123129
}

0 commit comments

Comments
 (0)