Skip to content

Commit 1816a9f

Browse files
Fix routing
1 parent 8162b5d commit 1816a9f

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

apps/tool_dbeditor/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
from apps.tool_dbeditor import views
44

55
urlpatterns = [
6-
path("db-editor" , views.db_editor, name="db_editor"),
6+
path("tools/db-editor" , views.db_editor, name="db_editor"),
77
]

frontend/src/common/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react'
2+
3+
const Common = () => {
4+
return (
5+
<div>Common</div>
6+
)
7+
}
8+
9+
export default Common
File renamed without changes.

frontend/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React from "react";
22
import ReactDOM from "react-dom/client";
33
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
4-
import DBEditor from "./DBEditor";
4+
import DBEditor from "./db-editor";
55

66
export default function App() {
77
return (
88
<Router>
99
<Routes>
10-
<Route path='/db-editor' element={<DBEditor />} />
10+
<Route path='/tools/db-editor' element={<DBEditor />} />
1111
</Routes>
1212
</Router>
1313
)

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = [
5656
output: {
5757
path: path.resolve("./frontend/static/frontend/"),
5858
filename: "[name]-[fullhash].js",
59-
publicPath: "static/frontend/",
59+
publicPath: "/static/frontend/",
6060
},
6161
plugins: [
6262
new CleanWebpackPlugin(),

0 commit comments

Comments
 (0)