Skip to content

Commit 4f8bf3e

Browse files
committed
frontend: Link: Avoid passing undefined prop, fixes react warning
Signed-off-by: Oleksandr Dubenko <[email protected]>
1 parent 821c501 commit 4f8bf3e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

frontend/src/components/common/Link.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,15 @@ function PureLink(
8585
const { kubeObject, ...otherProps } = props as LinkObjectProps;
8686
return <KubeObjectLink kubeObject={kubeObject!} {...otherProps} />;
8787
}
88-
const { routeName, params = {}, search, state, ...otherProps } = props as LinkObjectProps;
88+
const {
89+
routeName,
90+
params = {},
91+
search,
92+
state,
93+
// eslint-disable-next-line no-unused-vars -- make sure not to pass it to the link
94+
kubeObject,
95+
...otherProps
96+
} = props as LinkObjectProps;
8997

9098
return (
9199
<MuiLink

0 commit comments

Comments
 (0)