diff --git a/client/src/components/Canvas/Canvas.jsx b/client/src/components/Canvas/Canvas.jsx index eae9376..1e6739c 100644 --- a/client/src/components/Canvas/Canvas.jsx +++ b/client/src/components/Canvas/Canvas.jsx @@ -7,6 +7,8 @@ import Settings from "./views/Settings" import Home from "./views/Home"; import { DASHBOARD_VIEWS } from "@/constants/viewKeys"; import { chakra } from "@chakra-ui/react"; +import Personal from "./views/Personal"; +import Security from "./views/Security"; export default function Canvas({...props}) { const { view } = props; @@ -22,6 +24,8 @@ export default function Canvas({...props}) { {view === "admin" && } {view === "account" && } {view === "settings" && } + {view === "personal" && } + {view === "security" && } ); } \ No newline at end of file diff --git a/client/src/components/Canvas/views/Personal.jsx b/client/src/components/Canvas/views/Personal.jsx new file mode 100644 index 0000000..2a95b02 --- /dev/null +++ b/client/src/components/Canvas/views/Personal.jsx @@ -0,0 +1,9 @@ +import { Box } from "@chakra-ui/react"; + +export default function Personal() { + return ( + + Hello World + + ); +} \ No newline at end of file diff --git a/client/src/components/Canvas/views/Security.jsx b/client/src/components/Canvas/views/Security.jsx new file mode 100644 index 0000000..e8fac7f --- /dev/null +++ b/client/src/components/Canvas/views/Security.jsx @@ -0,0 +1,9 @@ +import { Box } from "@chakra-ui/react"; + +export default function Security() { + return ( + + Heya + + ); +} \ No newline at end of file diff --git a/client/src/components/Header/Header.jsx b/client/src/components/Header/Header.jsx index 1c127a7..a89eed9 100644 --- a/client/src/components/Header/Header.jsx +++ b/client/src/components/Header/Header.jsx @@ -14,7 +14,7 @@ export default function Header({ onChangeView }) { return ( - + {user.name} diff --git a/client/src/components/Sidebar/Sidebar.jsx b/client/src/components/Sidebar/Sidebar.jsx index 51f6380..a403f76 100644 --- a/client/src/components/Sidebar/Sidebar.jsx +++ b/client/src/components/Sidebar/Sidebar.jsx @@ -7,6 +7,8 @@ import { FaGlobeAmericas } from "react-icons/fa"; import { FaMapMarkerAlt } from "react-icons/fa"; import { HiUsers } from "react-icons/hi2"; import { VscThreeBars } from "react-icons/vsc"; +import { MdOutlineSecurity } from "react-icons/md"; +import { IoPersonCircleSharp } from "react-icons/io5"; import { useState, useEffect } from "react"; import { DASHBOARD_VIEWS } from "@/constants/viewKeys"; @@ -18,7 +20,7 @@ export default function Sidebar({ view, onChangeView, darkMode, setDarkMode }) { const { toggleColorMode } = useColorMode(); // this list of btns will come from the db (not every usr will have access to admin) - const buttons = [ + let buttons = [ {icon: FaHome, name: "Home", view: "mydashboard"}, {icon: FaGlobeAmericas, name: "Global Map", view: "global"}, {icon: FaMapMarkerAlt, name: "Regional Map", view: "regional"}, @@ -26,6 +28,14 @@ export default function Sidebar({ view, onChangeView, darkMode, setDarkMode }) { {icon: HiUsers, name: "Admin", view: "admin"} ]; + // Different Sidebar Button Options for Settings View + if (view === "settings" || view === "personal" || view === "security") { + buttons = [ + {icon: IoPersonCircleSharp, name: "Personal Info", view: "personal"}, + {icon: MdOutlineSecurity, name: "Security", view: "security"}, + ] + }; + const toggleSidebar = () => { if (isOpen) setIsOpen(false); else setIsOpen(true); @@ -79,12 +89,12 @@ export default function Sidebar({ view, onChangeView, darkMode, setDarkMode }) { {button.name} @@ -94,11 +104,10 @@ export default function Sidebar({ view, onChangeView, darkMode, setDarkMode }) { ) })} { - setDarkMode(!darkMode); - toggleColorMode(); - }} + onClick={() => { + setDarkMode(!darkMode); + toggleColorMode(); + }} position="absolute" bottom="2" />