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

Add a navigation bar #113

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Address review comments
  • Loading branch information
NoB0 committed Apr 2, 2024
commit 7b0653170b9a0c90df79d41a261dac11d4ef118b
7 changes: 4 additions & 3 deletions pkg_client/src/components/APIHandler.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { BrowserRouter, Route, Routes } from "react-router-dom";
import React, { useContext } from "react";
import { UserContext } from "../contexts/UserContext";

import Container from "react-bootstrap/Container";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Layout from "./Layout";
import { UserContext } from "../contexts/UserContext";

const APIHandler: React.FC = () => {
const { user } = useContext(UserContext);
Expand All @@ -16,7 +17,7 @@ const APIHandler: React.FC = () => {
<Route path="/" element={<Layout />}>
<Route index element={<div>Welcome {user?.username}</div>} />
{/* <Route path="service" element={<div>Service Management</div>} /> */}
<Route path="population" element={<div>Population form</div>} />
<Route path="population" element={<div>PKG Population</div>} />
<Route path="explore" element={<div>PKG Exploration</div>} />
</Route>
</Routes>
Expand Down
3 changes: 2 additions & 1 deletion pkg_client/src/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Outlet, Link } from "react-router-dom";
import { Link, Outlet } from "react-router-dom";

import Nav from "react-bootstrap/Nav";
import { useState } from "react";

Expand Down
11 changes: 5 additions & 6 deletions pkg_client/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import "bootstrap/dist/css/bootstrap.min.css";
import { UserProvider } from "./contexts/UserContext";

import "bootstrap/dist/css/bootstrap.min.css";
import App from "./App";
import React from "react";
import ReactDOM from "react-dom/client";
import { UserProvider } from "./contexts/UserContext";
import reportWebVitals from "./reportWebVitals";

const root = ReactDOM.createRoot(
document.getElementById("root") as HTMLElement
Expand Down
Loading