-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setting up develop branch with new pages and features
- Loading branch information
prince rusweka
committed
May 5, 2025
1 parent
d521555
commit fef9b38
Showing
18 changed files
with
878 additions
and
119 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React, { useState } from "react"; | ||
import { Outlet, useNavigate } from "react-router-dom"; | ||
|
||
export default function PAOLayout() { | ||
const navigate = useNavigate(); | ||
const [menuOpen, setMenuOpen] = useState(true); | ||
|
||
return ( | ||
<div style={{ display: "flex" }}> | ||
<div style={{ width: menuOpen ? "200px" : "50px", transition: "width 0.3s", background: "#333", color: "#fff", height: "100vh", padding: "1rem" }}> | ||
<div | ||
style={{ cursor: "pointer", fontSize: "1.5rem", marginBottom: "1rem" }} | ||
onClick={() => setMenuOpen(!menuOpen)} | ||
> | ||
☰ | ||
</div> | ||
{menuOpen && ( | ||
<div style={{ display: "flex", flexDirection: "column", gap: "1rem" }}> | ||
<button onClick={() => navigate("/pao/dashboard")} style={menuBtn}>User Dashboard</button> | ||
<button onClick={() => navigate("/pao/user/1")} style={menuBtn}>User Profile Page</button> | ||
<button onClick={() => navigate("/pao/pets/new")} style={menuBtn}>New Pet Listing</button> | ||
<button onClick={() => navigate("/pao/pets/1/edit")} style={menuBtn}>Edit Pet Listing</button> | ||
<button onClick={() => navigate("/pao/listings")} style={menuBtn}>PAO Admin Panel</button> | ||
</div> | ||
)} | ||
</div> | ||
|
||
<div style={{ flexGrow: 1, padding: "2rem" }}> | ||
<Outlet /> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
const menuBtn: React.CSSProperties = { | ||
background: "#555", | ||
border: "none", | ||
color: "white", | ||
padding: "0.5rem 1rem", | ||
textAlign: "left", | ||
cursor: "pointer", | ||
borderRadius: "4px" | ||
}; |
Oops, something went wrong.