Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ import { CssBaseline, ThemeProvider } from "@mui/material";
import { createTheme } from "@mui/material/styles";
import { useMemo } from "react";
import { useSelector } from "react-redux";
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom";
import {
HashRouter,
BrowserRouter,
Navigate,
Route,
Routes,
} from "react-router-dom";
import { themeSettings } from "theme";
import Layout from "scenes/layout";
import Dashboard from "scenes/dashboard";
import Products from "scenes/products";
import Customers from "scenes/customers";
import Transactions from "scenes/transactions";
import Geography from "scenes/geography";
import Transactions from "scenes/transactions";
import Overview from "scenes/overview";
import Daily from "scenes/daily";
import Monthly from "scenes/monthly";
Expand All @@ -20,9 +26,10 @@ import Performance from "scenes/performance";
function App() {
const mode = useSelector((state) => state.global.mode);
const theme = useMemo(() => createTheme(themeSettings(mode)), [mode]);

return (
<div className="app">
<BrowserRouter>
<HashRouter>
<ThemeProvider theme={theme}>
<CssBaseline />
<Routes>
Expand All @@ -31,8 +38,8 @@ function App() {
<Route path="/dashboard" element={<Dashboard />} />
<Route path="/products" element={<Products />} />
<Route path="/customers" element={<Customers />} />
<Route path="/transactions" element={<Transactions />} />
<Route path="/geography" element={<Geography />} />
<Route path="/transactions" element={<Transactions />} />
<Route path="/overview" element={<Overview />} />
<Route path="/daily" element={<Daily />} />
<Route path="/monthly" element={<Monthly />} />
Expand All @@ -42,7 +49,7 @@ function App() {
</Route>
</Routes>
</ThemeProvider>
</BrowserRouter>
</HashRouter>
</div>
);
}
Expand Down