Skip to content

Commit

Permalink
Merge pull request #154 from ansh-saini/sitemap
Browse files Browse the repository at this point in the history
add sitemap
  • Loading branch information
Mrhb787 authored Oct 15, 2021
2 parents a8e825e + 0215200 commit adce7ff
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import Wishlist from "../Cart/Wishlist";
import AddReviews from "../AddReviews/AddReviews";
import UserProfile from "../UserProfile/UserProfile";
import Receipt from "../UserProfile/Receipt";
import Sitemap from "../Sitemap/Sitemap";
import Track from "../UserProfile/OrderTracking";
import SellerPanel from "../SellerPanel/SellerPanel";
import SearchResult from "../SearchResult/AllCategories";
Expand Down Expand Up @@ -98,6 +99,9 @@ function App() {
<Route path="/Receipt">
<Receipt />
</Route>
<Route path="/Sitemap">
<Sitemap />
</Route>

<Route path="/">
<Navbar />
Expand Down
29 changes: 29 additions & 0 deletions src/components/Sitemap/Sitemap.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.container {
display: flex;
justify-content: center;
padding: 20px;

margin: 0px auto;
max-width: 600px;
}

@media (min-width: 600px) {
.content {
min-width: 560px;
}
}

.links {
margin-top: 20px;
display: flex;
flex-direction: column;
gap: 16px;
}

.links a:hover {
text-decoration: underline;
}

.links a {
color: #06c;
}
42 changes: 42 additions & 0 deletions src/components/Sitemap/Sitemap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React from "react";

import "./Sitemap.css";

const routes = [
{ name: "Sell Old Books", path: "/SellerPanel/5" },
{ name: "Search for books", path: "/SearchResult/tag:ALL" },

{ name: "About", path: "/About" },
{ name: "Contact", path: "/Contact" },
{ name: "Blog", path: "/Blog" },

{ name: "Login", path: "/Login" },
{ name: "Signup", path: "/Signup" },
{ name: "Forgot Password", path: "/ForgotPassword" },
{ name: "Wishlist", path: "/Wishlist" },
{ name: "Receipt", path: "/Receipt" },
{ name: "Cart", path: "/Cart" },

{ name: "Sitemap", path: "/Sitemap" },
];

function Sitemap() {
return (
<div className="container">
<div className="content">
<h1>Bookshlf Sitemap</h1>
<hr />

<div className="links">
{routes.map((route, i) => (
<span key={i}>
<a href={route.path}>{route.name}</a>
</span>
))}
</div>
</div>
</div>
);
}

export default Sitemap;

0 comments on commit adce7ff

Please sign in to comment.