Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion src/layouts/Profile/Sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { MdLogout } from "react-icons/md";
import { TbUserEdit } from "react-icons/tb";
import { SlCalender } from "react-icons/sl";
import { SiReacthookform } from "react-icons/si";
import { FaRegNewspaper } from "react-icons/fa";
import { FaRegNewspaper, FaCertificate } from "react-icons/fa";
import { LuClipboardList } from "react-icons/lu";
import AuthContext from "../../../context/AuthContext";
import styles from "./styles/Sidebar.module.scss";
Expand Down Expand Up @@ -227,6 +227,27 @@ const Sidebar = ({ activepage, handleChange }) => {
</div>
);

const renderCertificateMenu = () => (
<div
onClick={() => handleChange("Certificates")}
style={{
background: activepage === "Certificates" ? "var(--primary)" : "transparent",
WebkitBackgroundClip: activepage === "Certificates" ? "text" : "initial",
backgroundClip: activepage === "Certificates" ? "text" : "initial",
color: activepage === "Certificates" ? "transparent" : "inherit",
}}
>
<FaCertificate
size={17}
style={{
color: activepage === "Certificates" ? "#FF8A00" : "white",
marginRight: "10px",
}}
/>{" "}
<Link to={"/profile/certificates"}>Certificates</Link>
</div>
);

return (
<>
<div className={styles.sidebar}>
Expand Down Expand Up @@ -304,6 +325,7 @@ const Sidebar = ({ activepage, handleChange }) => {
</NavLink>
</div>
)}
{renderCertificateMenu()}
</>
)}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/AttendancePage/AttendancePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -426,4 +426,4 @@ const AttendancePage = () => {
);
};

export default AttendancePage;
export default AttendancePage;