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

about page #44

Merged
merged 1 commit into from
Jun 4, 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
2 changes: 2 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import NotFoundRedirect from "components/NotFoundRedirect";
import { AlertQueue, AlertQueueProvider } from "hooks/alerts";
import { AuthenticationProvider, OneTimePasswordWrapper } from "hooks/auth";
import { ThemeProvider } from "hooks/theme";
import About from "pages/About";
import Home from "pages/Home";
import NotFound from "pages/NotFound";
import PartDetails from "pages/PartDetails";
Expand All @@ -28,6 +29,7 @@ const App = () => {
<Container className="content">
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
<Route path="/robots/" element={<Robots />} />
<Route path="/robot/:id" element={<RobotDetails />} />
<Route path="/parts/" element={<Parts />} />
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/nav/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AuthComponent from "components/auth/AuthComponent";
import { Col, Offcanvas, Row } from "react-bootstrap";
import { Link } from "react-router-dom";

interface Props {
show: boolean;
Expand All @@ -23,7 +24,7 @@ const Sidebar = ({ show, onHide }: Props) => {
<AuthComponent />
<Row style={{ marginTop: "auto" }} />
<Row>
<a href="#">About</a>
<Link to="/about">About</Link>
</Row>
<Row>
<a href="#">Privacy Policy</a>
Expand Down
22 changes: 22 additions & 0 deletions frontend/src/pages/About.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Container, Row } from "react-bootstrap";

const About = () => {
return (
<Container className="pt-5" style={{ textAlign: "center" }} fluid>
<Row className="mb-5">
<h1 className="display-4">about</h1>
<p className="lead">
This is a simple platform for aggregating robots, robot parts and
build guides.
</p>
<p>
It is maintained by <a href="https://kscale.dev/">K-Scale Labs</a>{" "}
with source code freely available on{" "}
<a href="https://github.com/kscalelabs/store">Github</a>.
</p>
</Row>
</Container>
);
};

export default About;
4 changes: 2 additions & 2 deletions frontend/src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Card, Col, Row } from "react-bootstrap";
import { useNavigate } from "react-router-dom";

const RobotDetails = () => {
const Home = () => {
const navigate = useNavigate();

return (
Expand Down Expand Up @@ -32,4 +32,4 @@ const RobotDetails = () => {
);
};

export default RobotDetails;
export default Home;
Loading