merged branch

This commit was merged in pull request #12.
This commit is contained in:
victorAnumudu
2024-03-16 03:09:41 +01:00
11 changed files with 127 additions and 43 deletions
+5 -3
View File
@@ -1,4 +1,4 @@
import { Link, useLocation } from "react-router-dom";
import { Link, useLocation, useNavigate } from "react-router-dom";
import { Icons } from "../index";
@@ -6,6 +6,8 @@ export default function Aside() {
const {pathname} = useLocation()
const navigate = useNavigate()
return (
<div className="py-5 px-10 flex flex-col h-full">
<div className="flex justify-center items-center text-sm">
@@ -18,7 +20,7 @@ export default function Aside() {
<Link
key={index}
to={link.link}
className={`w-full my-4 flex items-center gap-2 py-2 pl-5 rounded-lg text-base font-medium ${pathname == link.link ? 'border-2 border-[#5C2684] text-[#5C2684]' : 'text-[#585858]'}`}
className={`w-full my-4 flex items-center gap-2 py-2 pl-5 rounded-lg text-base font-medium border-2 ${pathname == link.link ? 'border-[#5C2684] text-[#5C2684]' : 'border-transparent text-[#585858]'}`}
>
<Icons name={link.icon} fillColor={`${pathname == link.link ? '#5C2684' : '#585858'}`} />
{link.name}
@@ -26,7 +28,7 @@ export default function Aside() {
))}
</div>
<div className="w-full flex justify-center items-center">
<button className="py-3 px-6 bg-red-100 text-red-500 font-medium">
<button className="py-3 px-6 bg-red-100 text-red-500 font-medium" onClick={()=>navigate('/login', {replace:true})}>
Log out
</button>
</div>