Skip to content

Commit

Permalink
About page
Browse files Browse the repository at this point in the history
  • Loading branch information
matherg committed Dec 8, 2023
1 parent 476bc07 commit c870b02
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function App() {
</AdminProvider>
}
/>
<Route path="/home/" element={<ReturnHomePage />} />
<Route path="/about/" element={<ReturnHomePage />} />
<Route path="/signup/" element={<SignUpPage />} />
<Route path="/login/" element={<LoginPage />} />
<Route path="/success/" element={<RequestPurchaseSuccess />} />
Expand Down
7 changes: 5 additions & 2 deletions client/src/components/Home/NavBarUpdated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const Navbar = () => {
setActiveButton(buttonName);
if (buttonName === "Profile") {
navigate("/profile")
}
if(buttonName === "About") {
navigate("/about")
}
if (buttonName === "Shop") {
navigate("/")
Expand Down Expand Up @@ -54,9 +57,9 @@ const Navbar = () => {
</button>
<button
className={`${buttonStyle} ${
activeButton === "More" ? activeButtonStyle : ""
activeButton === "About" ? activeButtonStyle : ""
}`}
onClick={() => handleButtonClick("More")}
onClick={() => handleButtonClick("About")}
>
About
</button>
Expand Down
9 changes: 5 additions & 4 deletions client/src/pages/ReturnHomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ import CaitThumbnail2 from "../images/cait_thumbnail_2.svg";
import CaitThumbnail3 from "../images/cait_thumbnail_3.svg";
import Or from "../images/or.svg";
import Navbar from "../components/Home/NavBarUpdated";
import {useNavigate} from "react-router-dom";

const ReturnHomePage = () => {

const navigate = useNavigate();
const handleShoppingClick = () => {
// handle click
navigate('/')
}

const handleBrowsingClick = () => {
// handle click
navigate('/')
}

const handleRequestsClick = () => {
// handle click
navigate('/')
}

return (
Expand Down

0 comments on commit c870b02

Please sign in to comment.