Skip to content

Commit

Permalink
feat: Upgrades router to v5 (#289)
Browse files Browse the repository at this point in the history
* feat: new root for React 18

* feat: router v5

* refactor: removes unused constant
  • Loading branch information
tuliomir authored Aug 14, 2024
1 parent 1bbbb7c commit cda254a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 51 deletions.
64 changes: 23 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"react-loading": "2.0.3",
"react-paginate": "8.2.0",
"react-redux": "8.1.3",
"react-router-dom": "4.2.2",
"react-router-dom": "5.3.4",
"react-scripts": "3.4.4",
"redux": "4.2.1",
"sass": "1.77.8",
Expand Down
5 changes: 0 additions & 5 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ export const MAX_GRAPH_LEVEL = 1
// First bit in the index byte indicates whether it's an authority output
export const TOKEN_AUTHORITY_MASK = 0b10000000

/**
* Hathor token default index
*/
export const HATHOR_TOKEN_INDEX = 0;

export const GTM_ID = process.env.REACT_APP_GTM_ID;

export const NFT_MEDIA_TYPES = {
Expand Down
9 changes: 5 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import App from './App';
import FlagProvider from '@unleash/proxy-client-react';

Expand All @@ -19,11 +19,12 @@ import store from "./store/index";
import { Provider } from "react-redux";
import { UNLEASH_CONFIG } from './constants';

ReactDOM.render(
const container = document.getElementById('root');
const root = createRoot(container);
root.render(
<FlagProvider config={UNLEASH_CONFIG}>
<Provider store={store}>
<App />
</Provider>
</FlagProvider>,
document.getElementById('root')
</FlagProvider>
);

0 comments on commit cda254a

Please sign in to comment.