Skip to content

Commit

Permalink
fix react compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
vladae36 committed Apr 19, 2024
1 parent 17b6d05 commit 2e8f09c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 33 deletions.
58 changes: 29 additions & 29 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@ant-design/icons": "~4.2.1",
"@testing-library/jest-dom": "~4.2.4",
"@testing-library/react": "~9.3.2",
"@testing-library/user-event": "~7.1.2",
"@types/history": "~4.7.6",
"@types/jest": "~24.0.0",
"@types/node": "~12.0.0",
"@types/react": "~16.9.0",
"@types/react-dom": "~16.9.0",
"@types/react-redux": "~7.1.9",
"@types/react-router-dom": "~5.1.5",
"@types/redux": "~3.6.0",
"@types/redux-thunk": "~2.1.0",
"antd": "~4.2.4",
"craco": "~0.0.3",
"@ant-design/icons": "^4.2.1",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@types/history": "^4.7.6",
"@types/jest": "^24.0.0",
"@types/node": "^12.0.0",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"@types/react-redux": "^7.1.9",
"@types/react-router-dom": "^5.1.5",
"@types/redux": "^3.6.0",
"@types/redux-thunk": "^2.1.0",
"antd": "^4.2.4",
"craco": "^0.0.3",
"craco-less": "1.16",
"history": "~4.10.1",
"js-base64": "~2.5.2",
"lodash": "~4.17.19",
"map-keys-deep-lodash": "~1.2.2",
"prettier": "~2.0.5",
"react": "~16.13.1",
"react-dom": "~16.13.1",
"react-json-tree": "~0.11.2",
"react-redux": "~7.2.0",
"react-router-dom": "~5.2.0",
"history": "^4.10.1",
"js-base64": "^2.5.2",
"lodash": "^4.17.19",
"map-keys-deep-lodash": "^1.2.2",
"prettier": "^2.0.5",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-json-tree": "^0.11.2",
"react-redux": "^7.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.1",
"redux": "~4.0.5",
"redux-thunk": "~2.3.0",
"redux-thunk-recursion-detect": "~1.1.4",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"redux-thunk-recursion-detect": "^1.1.4",
"typescript": "~3.7.2"
},
"scripts": {
Expand Down Expand Up @@ -60,6 +60,6 @@
]
},
"devDependencies": {
"eslint-config-airbnb-typescript-prettier": "~2.1.1"
"eslint-config-airbnb-typescript-prettier": "^2.1.1"
}
}
3 changes: 1 addition & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import React from 'react';
import { connect } from 'react-redux';
import { Route, Router } from 'react-router-dom';
import history from './history';
import { History } from 'history';
import Pages from './routes/Pages';
import { checkAuthentication } from './actions/auth';
import { Store } from './types';
Expand All @@ -36,7 +35,7 @@ const App = ({ checkAuthenticationConnect, isAuthenticated }: Props) => {

const app =
isAuthenticated !== null ? (
<Router history={history as History<unknown>}>
<Router history={history}>
<Route component={Pages} />
</Router>
) : null;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/

/* eslint-disable @typescript-eslint/no-explicit-any */
import { createBrowserHistory, History } from 'history';
import { createBrowserHistory, History,LocationState } from 'history';

declare global {
interface Window {
dataLayer: any;
}
}

const history: History<unknown> = createBrowserHistory();
const history: History<undefined> = createBrowserHistory();

export default history;

0 comments on commit 2e8f09c

Please sign in to comment.