chore(react): fixing issue with new history types (#22109)

This commit is contained in:
Ely Lucas 2020-09-17 16:03:33 -06:00 committed by Brandy Carney
parent bd675e42c7
commit 5cdf68b674
5 changed files with 1574 additions and 1334 deletions

View File

@ -4,12 +4,12 @@ import { BrowserRouterProps, Router } from 'react-router-dom';
import { IonRouter } from './IonRouter';
interface IonReactHashRouterProps<THistoryLocationState = History.PoorMansUnknown> extends BrowserRouterProps {
history?: History<THistoryLocationState>;
interface IonReactHashRouterProps extends BrowserRouterProps {
history?: History;
}
export class IonReactHashRouter extends React.Component<IonReactHashRouterProps> {
history: History<History.PoorMansUnknown>;
history: History;
historyListenHandler?: ((location: HistoryLocation, action: HistoryAction) => void);
constructor(props: IonReactHashRouterProps) {

View File

@ -2,14 +2,14 @@ import { Action as HistoryAction, Location as HistoryLocation, MemoryHistory } f
import React from 'react';
import { MemoryRouterProps, Router } from 'react-router';
import { IonRouter, LocationState } from './IonRouter';
import { IonRouter } from './IonRouter';
interface IonReactMemoryRouterProps extends MemoryRouterProps {
history: MemoryHistory<LocationState>;
history: MemoryHistory;
}
export class IonReactMemoryRouter extends React.Component<IonReactMemoryRouterProps> {
history: MemoryHistory<LocationState>;
history: MemoryHistory;
historyListenHandler?: ((location: HistoryLocation, action: HistoryAction) => void);
constructor(props: IonReactMemoryRouterProps) {

View File

@ -4,14 +4,14 @@ import { BrowserRouterProps, Router } from 'react-router-dom';
import { IonRouter } from './IonRouter';
interface IonReactRouterProps<THistoryLocationState = History.PoorMansUnknown> extends BrowserRouterProps {
history?: History<THistoryLocationState>;
interface IonReactRouterProps extends BrowserRouterProps {
history?: History;
}
export class IonReactRouter extends React.Component<IonReactRouterProps> {
historyListenHandler?: ((location: HistoryLocation, action: HistoryAction) => void);
history: History<History.PoorMansUnknown>;
history: History;
constructor(props: IonReactRouterProps) {
super(props);

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,6 @@
"@capacitor/android": "^2.2.0",
"@capacitor/core": "1.5.2",
"@capacitor/ios": "^2.2.0",
"@ionic/core": "^5.3.0-dev.202006121329.e968bd0",
"@ionic/react": "file:../../react/ionic-react-5.3.2.tgz",
"@svgr/webpack": "4.3.3",
"@testing-library/jest-dom": "^4.2.4",
@ -17,7 +16,7 @@
"@types/node": "^12.12.24",
"@types/react": "^16.9.17",
"@types/react-dom": "^16.9.4",
"@types/react-router": "^5.1.4",
"@types/react-router": "^5.1.8",
"@types/react-router-dom": "^5.1.3",
"@typescript-eslint/eslint-plugin": "^2.10.0",
"@typescript-eslint/parser": "^2.10.0",