-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix warning on catchall page due to improper sanitization in <NotFound> component. #4275
Conversation
No, I don't think we should do that. If a route is to be used as a child of Route, it should expect these props to be passed. |
Hi, thanks for your contribution :) By reading your PR, I'm wondering what issue you try to fix. I think it's the warning on the NotFound page, but you didn't mention it in the description. Could you write what you try to achieve? Regards, |
I tried to avoid the In the below sample, change the end of the url to something that doesn't exist like In the console you'll see the error I tried to solve:
|
@fzaninotto, The const NotFound = ({ className, classes: classesOverride, title, ...rest }) => {
const classes = useStyles({ classes: classesOverride });
const translate = useTranslate();
useAuthenticated();
return (
<div
className={classnames(classes.container, className)}
{...sanitizeRestProps(rest)} // <-- Here
>
//... |
Sorry, I read too fast. Reopening. |
In the future, can you please post a more precise description of the bug you're trying to fix? Otherwise we have to guess and sometimes we guess wrong ;) |
No problem, It was my fault, , I assume it was a trivial change to understand. |
Thanks! |
This could happend from
RoutesWithLayout.tsx
.