mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 10:41:13 +08:00
This commit is contained in:
16
packages/react-router/src/ReactRouter/IonReactHashRouter.tsx
Normal file
16
packages/react-router/src/ReactRouter/IonReactHashRouter.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import React from 'react';
|
||||
import { HashRouter, HashRouterProps } from 'react-router-dom';
|
||||
|
||||
import { RouteManagerWithRouter } from './Router';
|
||||
|
||||
export const IonReactHashRouter = /*@__PURE__*/ (() => class IonReactHashRouterInternal extends React.Component<HashRouterProps> {
|
||||
render() {
|
||||
console.log('hash router in your bundle!!!');
|
||||
const { children, ...props } = this.props;
|
||||
return (
|
||||
<HashRouter {...props}>
|
||||
<RouteManagerWithRouter>{children}</RouteManagerWithRouter>
|
||||
</HashRouter>
|
||||
);
|
||||
}
|
||||
})();
|
Reference in New Issue
Block a user