Skip to content

Commit 33e4553

Browse files
committed
Solved ApexCharts bug
1 parent 8f8dfea commit 33e4553

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
package-lock.json
3+
yarn.lock
34
build
45

56
# dependencies

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"@testing-library/jest-dom": "^5.14.1",
1515
"@testing-library/react": "^11.2.7",
1616
"@testing-library/user-event": "^12.8.3",
17+
"apexcharts": "^3.35.2",
1718
"babel-cli": "^6.26.0",
1819
"babel-preset-es2015": "^6.24.1",
1920
"babel-preset-react": "^6.24.1",

src/index.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,19 @@ import AdminLayout from "layouts/admin";
77
import RTLLayout from "layouts/rtl";
88
import { ChakraProvider } from "@chakra-ui/react";
99
import theme from "theme/theme";
10-
import { BrowserRouter } from "react-router-dom";
1110

1211
ReactDOM.render(
1312
<ChakraProvider theme={theme}>
14-
<BrowserRouter>
15-
<React.StrictMode>
16-
<HashRouter>
17-
<Switch>
18-
<Route path={`/auth`} component={AuthLayout} />
19-
<Route path={`/admin`} component={AdminLayout} />
20-
<Route path={`/rtl`} component={RTLLayout} />
21-
<Redirect from='/' to='/admin' />
22-
</Switch>
23-
</HashRouter>
24-
</React.StrictMode>
25-
</BrowserRouter>
13+
<React.StrictMode>
14+
<HashRouter>
15+
<Switch>
16+
<Route path={`/auth`} component={AuthLayout} />
17+
<Route path={`/admin`} component={AdminLayout} />
18+
<Route path={`/rtl`} component={RTLLayout} />
19+
<Redirect from='/' to='/admin' />
20+
</Switch>
21+
</HashRouter>
22+
</React.StrictMode>
2623
</ChakraProvider>,
2724
document.getElementById("root")
2825
);

src/layouts/admin/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ import Navbar from "components/navbar/NavbarAdmin.js";
66
import Sidebar from "components/sidebar/Sidebar.js";
77
import { SidebarContext } from "contexts/SidebarContext";
88
import React, { useState } from "react";
9-
import { Redirect, Route, Switch } from "react-router-dom";
9+
import { Redirect, Route, Switch, useLocation } from "react-router-dom";
1010
import routes from "routes.js";
1111

1212
// Custom Chakra theme
1313
export default function Dashboard(props) {
14+
let location = useLocation();
1415
const { ...rest } = props;
1516
// states and functions
1617
const [fixed] = useState(false);

0 commit comments

Comments
 (0)