feat: change API router structure
This commit is contained in:
@@ -8,7 +8,7 @@ import { BrowserRouter, Routes, Route } from "react-router-dom";
|
||||
function App() {
|
||||
//const [data, setData] = useState({ nodes: [], links: [] } as SociogramData);
|
||||
//async function loadData() {
|
||||
// await fetch(`${baseUrl}analysis/json`, { method: "GET" }).then(resp => resp.json() as unknown as SociogramData).then(json => { setData(json) })
|
||||
// await fetch(`${baseUrl}api/analysis/json`, { method: "GET" }).then(resp => resp.json() as unknown as SociogramData).then(json => { setData(json) })
|
||||
//}
|
||||
//useEffect(() => { loadData() }, [])
|
||||
//
|
||||
@@ -17,7 +17,7 @@ function App() {
|
||||
<Header />
|
||||
<Routes>
|
||||
<Route index element={<Rankings />} />
|
||||
<Route path="analysis" element={<Analysis />} />
|
||||
<Route path="/analysis" element={<Analysis />} />
|
||||
</Routes>
|
||||
<Footer />
|
||||
</BrowserRouter>
|
||||
|
Reference in New Issue
Block a user