mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(IonRouteInner): upgrade to rr6
This commit is contained in:
@@ -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} />;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user