chore(IonRouteInner): upgrade to rr6

This commit is contained in:
Maria Hutt
2025-05-19 17:01:48 -07:00
parent 2436ba383e
commit ca27ed618b
2 changed files with 3 additions and 24 deletions

View File

@@ -4,27 +4,6 @@ import { Route } from 'react-router';
export class IonRouteInner extends React.PureComponent<IonRouteProps> {
render() {
return (
<Route
path={this.props.path}
exact={this.props.exact}
render={this.props.render}
{
/**
* `computedMatch` is a private API in react-router v5 that
* has been removed in v6.
*
* This needs to be removed when we support v6.
*
* TODO: FW-647
*/
...((this.props as any).computedMatch !== undefined
? {
computedMatch: (this.props as any).computedMatch,
}
: {})
}
/>
);
return <Route path={this.props.path} end={this.props.end} element={this.props.element} />;
}
}

View File

@@ -4,9 +4,9 @@ import { NavContext } from '../contexts/NavContext';
export interface IonRouteProps {
path?: string;
exact?: boolean;
end?: boolean;
show?: boolean;
render: (props?: any) => JSX.Element; // TODO(FW-2959): type
element: React.ReactElement;
disableIonPageManagement?: boolean;
}