-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update react router setup to comply with new v6 version * Update dev docker-compose to use yarn * Remove use-query-params which is not compatible with router v6
- Loading branch information
1 parent
1aa441a
commit e7da749
Showing
5 changed files
with
300 additions
and
304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
import React from 'react'; | ||
import { ThemeProvider } from '@material-ui/core'; | ||
import { createTheme } from '@material-ui/core'; | ||
import ExplorerView from './views/ExplorerView'; | ||
import { BrowserRouter as Router, Route } from 'react-router-dom'; | ||
import { QueryParamProvider } from 'use-query-params'; | ||
import React from "react"; | ||
import { ThemeProvider } from "@material-ui/core"; | ||
import { createTheme } from "@material-ui/core"; | ||
import ExplorerView from "./views/ExplorerView"; | ||
import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; | ||
|
||
if (process.env.NODE_ENV !== 'production') { | ||
const whyDidYouRender = require('@welldone-software/why-did-you-render'); | ||
if (process.env.NODE_ENV !== "production") { | ||
const whyDidYouRender = require("@welldone-software/why-did-you-render"); | ||
whyDidYouRender(React); | ||
} | ||
|
||
const App: React.FC = () => { | ||
const darkTheme = createTheme({ | ||
palette: { | ||
type: 'dark', | ||
type: "dark", | ||
}, | ||
}); | ||
|
||
return ( | ||
<ThemeProvider theme={darkTheme}> | ||
<Router> | ||
<QueryParamProvider ReactRouterRoute={Route}> | ||
<ExplorerView /> | ||
</QueryParamProvider> | ||
<Routes> | ||
<Route path="" element={<ExplorerView />} /> | ||
</Routes> | ||
</Router> | ||
</ThemeProvider > | ||
</ThemeProvider> | ||
); | ||
} | ||
}; | ||
|
||
export default App; | ||
export default App; |
Oops, something went wrong.