-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
45 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react"; | ||
import { BrowserRouter, Route, Routes } from "react-router-dom"; | ||
|
||
import Header from "./components/header.tsx"; | ||
import Footer from "./components/footer.tsx"; | ||
|
||
import Home from "./pages/home.tsx"; | ||
import Checklist from "./pages/checklist.tsx"; | ||
import FlowDiagram from "./pages/flow_diagram.tsx"; | ||
import NotFound from "./pages/notfound.tsx"; | ||
|
||
const App: React.FC = () => { | ||
return ( | ||
<React.StrictMode> | ||
<BrowserRouter> | ||
<Header /> | ||
<Routes> | ||
<Route path="/" element={<Home />} /> | ||
<Route path="/checklist" element={<Checklist />} /> | ||
<Route path="/flow_diagram" element={<FlowDiagram />} /> | ||
<Route path="*" element={<NotFound />} /> | ||
</Routes> | ||
<Footer /> | ||
</BrowserRouter> | ||
</React.StrictMode> | ||
); | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,8 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import { BrowserRouter, Route, Routes } from "react-router-dom"; | ||
|
||
import App from "./app.tsx"; | ||
import "./assets/css/index.css"; | ||
|
||
import Header from "./components/header.tsx"; | ||
import Footer from "./components/footer.tsx"; | ||
|
||
import Home from "./pages/home.tsx"; | ||
import Checklist from "./pages/checklist.tsx"; | ||
import FlowDiagram from "./pages/flow_diagram.tsx"; | ||
import NotFound from "./pages/notfound.tsx"; | ||
|
||
const rootElement = document.getElementById("root") as HTMLDivElement; | ||
|
||
if (rootElement) { | ||
const root = ReactDOM.createRoot(rootElement); | ||
root.render( | ||
<React.StrictMode> | ||
<BrowserRouter> | ||
<Header /> | ||
<Routes> | ||
<Route path="/" element={<Home />} /> | ||
<Route path="/checklist" element={<Checklist />} /> | ||
<Route path="/flow_diagram" element={<FlowDiagram />} /> | ||
<Route path="*" element={<NotFound />} /> | ||
</Routes> | ||
<Footer /> | ||
</BrowserRouter> | ||
</React.StrictMode> | ||
); | ||
} | ||
const container = document.getElementById("root") as HTMLElement; | ||
if (!container) throw new Error("Root container missing in index.html"); | ||
const root = ReactDOM.createRoot(container); | ||
root.render(<App />); |