From 1a4bb50f3e487bc4964268328eb307089f25cb9e Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Tue, 30 May 2023 18:11:24 +0200 Subject: [PATCH] Created the PowerItem.jsx --- .../components/PowerItem/PowerItem.jsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 client/src/common/components/Sidebar/components/SidebarContent/components/PowerItem/PowerItem.jsx diff --git a/client/src/common/components/Sidebar/components/SidebarContent/components/PowerItem/PowerItem.jsx b/client/src/common/components/Sidebar/components/SidebarContent/components/PowerItem/PowerItem.jsx new file mode 100644 index 0000000..6550f4b --- /dev/null +++ b/client/src/common/components/Sidebar/components/SidebarContent/components/PowerItem/PowerItem.jsx @@ -0,0 +1,15 @@ +import "./styles.sass"; +import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; +import {useLocation, useNavigate} from "react-router-dom"; + +export const PowerItem = ({icon, name, path}) => { + const location = useLocation(); + const navigate = useNavigate(); + + return ( +
navigate(path)}> + +

{name}

+
+ ); +} \ No newline at end of file