Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor router #79

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
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
174 changes: 28 additions & 146 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@
"prepare": "husky"
},
"dependencies": {
"vite-plugin-env-compatible": "^2.0.1",
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.4.2",
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/react-fontawesome": "^0.1.14",
"@frogcat/ttl2jsonld": "^0.0.6",
"@kbss-cvut/s-forms": "^0.7.2-beta-6cfd5af.0",
"@tippyjs/react": "^4.2.5",
"@triply/yasgui": "^4.2.14",
"@vitejs/plugin-react": "^4.3.1",
"bootstrap": "^4.5.3",
"cytoscape": "^3.30.2",
"cytoscape-compound-drag-and-drop": "^1.1.0",
Expand All @@ -43,13 +41,14 @@
"react-bootstrap": "^1.4.3",
"react-cytoscapejs": "^1.2.1",
"react-dom": "^18.2.0",
"react-imported-component": "^6.5.4",
"react-json-pretty": "^2.2.0",
"react-router-dom": "^5.1.2",
"react-router-dom": "^6.27.0",
"react-spring": "^8.0.27",
"react-treebeard": "^3.2.4",
"semantic-ui-react": "^2.1.5",
"superagent": "^6.1.0"
"superagent": "^6.1.0",
"vite": "^5.4.2",
"vite-plugin-env-compatible": "^2.0.1"
},
"devDependencies": {
"autoprefixer": "^9.7.6",
Expand Down
26 changes: 26 additions & 0 deletions src/Router.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from "react";
import { Routes, BrowserRouter, Route } from "react-router-dom";
import Home from "./components/Home.jsx";
import Executions from "./components/Executions.jsx";
import Scripts from "./components/Scripts.jsx";
import Dagre from "./components/dagre/Dagre.jsx";
import NoMatch from "./components/NoMatch.jsx";
import Layout from "./components/Layout.jsx";

const Router = () => {
return (
<BrowserRouter>
<Routes>
<Route element={<Layout />}>
<Route path="/" element={<Home />} />
<Route path="scripts" element={<Scripts />} />
<Route path="executions" element={<Executions />} />
<Route path="*" element={<NoMatch />} />
</Route>
<Route path="script" element={<Dagre />} />
</Routes>
</BrowserRouter>
);
};

export default Router;
38 changes: 0 additions & 38 deletions src/components/App.jsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/Executions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Executions extends React.Component {
return <h3>Loading</h3>;
} else {
return (
<Layout>
<>
<h3>Executions</h3>
<Table striped bordered hover>
<thead>
Expand Down Expand Up @@ -81,7 +81,7 @@ class Executions extends React.Component {
})}
</tbody>
</Table>
</Layout>
</>
);
}
}
Expand Down
Loading
Loading