Eric Whale

Edit routes

// components
import { Outlet, useLocation } from "react-router-dom";
// components
import Bottombar from "./components/Bottombar";
import Topbar from "./components/Topbar";
......@@ -12,11 +12,7 @@ function App() {
}
return (
<div>
<h1>Notification</h1>
<p>temporal use when first logged in</p>
<p>If user wants to use notifications after moving to another page</p>
<p>the notification will be in settings page</p>
<h1>chatroom</h1>
</div>
);
};
......
......@@ -6,7 +6,7 @@ function Bottombar() {
return (
<div className="bottombar">
<nav>
<NavLink to="/chatroom">Chatroom</NavLink> |{" "}
<NavLink to="/">Chatroom</NavLink> |{" "}
<NavLink to="/userroom">Userroom</NavLink>
</nav>
</div>
......
......@@ -5,7 +5,7 @@ import "../styles/bar.scss";
function Topbar() {
return (
<div className="topbar">
<Link to="/chatroom">LOGO</Link>
<Link to="/">LOGO</Link>
<div>Search Bar</div>
<Link to="/settings">Settings</Link>
</div>
......
......@@ -6,7 +6,6 @@ import App from "./App";
// routes
import Signup from "./routes/signup";
import Login from "./routes/login";
import Chatroom from "./routes/chatroom";
import Userroom from "./routes/userroom";
import Settings from "./routes/settings";
......@@ -16,7 +15,6 @@ root.render(
<BrowserRouter>
<Routes>
<Route path="/" element={<App />}>
<Route path="/chatroom" element={<Chatroom />} />
<Route path="/userroom" element={<Userroom />} />
<Route path="/settings" element={<Settings />} />
</Route>
......
// styles
import "../styles/chatroom.scss";
function Chatroom() {
return (
<div className="chatroom">
<h1>Chatroom page</h1>
</div>
);
}
export default Chatroom;
.chatroom {
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
}