changed to hash router
This commit is contained in:
parent
013ca03a35
commit
81e66a6587
1 changed files with 8 additions and 23 deletions
|
@ -1,7 +1,7 @@
|
||||||
import React, { useState } from "react"
|
import React, { useState } from "react"
|
||||||
import ReactDOM from "react-dom"
|
import ReactDOM from "react-dom"
|
||||||
|
|
||||||
import { BrowserRouter, Switch, Route } from "react-router-dom"
|
import { HashRouter, Switch, Route } from "react-router-dom"
|
||||||
|
|
||||||
import { Layout } from "antd"
|
import { Layout } from "antd"
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ const App = () => {
|
||||||
<SidebarCollapsedContext.Provider
|
<SidebarCollapsedContext.Provider
|
||||||
value={{ isSidebarCollapsed, setSidebarCollapsed }}
|
value={{ isSidebarCollapsed, setSidebarCollapsed }}
|
||||||
>
|
>
|
||||||
<BrowserRouter>
|
<HashRouter basename="/">
|
||||||
<Layout style={{ minHeight: "100vh" }}>
|
<Layout style={{ minHeight: "100vh" }}>
|
||||||
<Layout className="site-layout">
|
<Layout className="site-layout">
|
||||||
<Navbar />
|
<Navbar />
|
||||||
|
@ -49,34 +49,19 @@ const App = () => {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route
|
<Route exact path="/">
|
||||||
exact
|
|
||||||
path={`${process.env.PUBLIC_URL}/`}
|
|
||||||
>
|
|
||||||
<Home />
|
<Home />
|
||||||
</Route>
|
</Route>
|
||||||
<Route
|
<Route exact path="/dashboard">
|
||||||
exact
|
|
||||||
path={`${process.env.PUBLIC_URL}/dashboard`}
|
|
||||||
>
|
|
||||||
<Dashboard />
|
<Dashboard />
|
||||||
</Route>
|
</Route>
|
||||||
<Route
|
<Route exact path="/modules">
|
||||||
exact
|
|
||||||
path={`${process.env.PUBLIC_URL}/modules`}
|
|
||||||
>
|
|
||||||
<Modules />
|
<Modules />
|
||||||
</Route>
|
</Route>
|
||||||
<Route
|
<Route exact path="/logs">
|
||||||
exact
|
|
||||||
path={`${process.env.PUBLIC_URL}/logs`}
|
|
||||||
>
|
|
||||||
<Logs />
|
<Logs />
|
||||||
</Route>
|
</Route>
|
||||||
<Route
|
<Route exact path="/incidents">
|
||||||
exact
|
|
||||||
path={`${process.env.PUBLIC_URL}/incidents`}
|
|
||||||
>
|
|
||||||
<Incidents />
|
<Incidents />
|
||||||
</Route>
|
</Route>
|
||||||
</Switch>
|
</Switch>
|
||||||
|
@ -86,7 +71,7 @@ const App = () => {
|
||||||
<Footer />
|
<Footer />
|
||||||
</Layout>
|
</Layout>
|
||||||
</Layout>
|
</Layout>
|
||||||
</BrowserRouter>
|
</HashRouter>
|
||||||
</SidebarCollapsedContext.Provider>
|
</SidebarCollapsedContext.Provider>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue