mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
Initial commit
This commit is contained in:
commit
55332d1ddb
168 changed files with 18456 additions and 0 deletions
|
|
@ -0,0 +1,67 @@
|
|||
import { FC } from "react";
|
||||
import { usePathname } from "next/navigation";
|
||||
import LinkComponent from "./NavLink";
|
||||
import { navConfig } from "@/lib/config/";
|
||||
|
||||
type NavLinksProps = {
|
||||
collapsed: boolean;
|
||||
animationDuration: number;
|
||||
};
|
||||
|
||||
const NavLinks: FC<NavLinksProps> = ({ collapsed, animationDuration }) => {
|
||||
const pathName = usePathname();
|
||||
|
||||
return (
|
||||
<div className="flex h-full flex-col justify-between">
|
||||
<div id="topNavLinks">
|
||||
{navConfig.navLinks.map((link, index) => {
|
||||
if (link.navLocation === "top") {
|
||||
const activeLink = pathName === link.href;
|
||||
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className="px-5 text-muted-foreground transition-all duration-300 hover:text-foreground"
|
||||
>
|
||||
<LinkComponent
|
||||
activeLink={activeLink}
|
||||
href={link.href}
|
||||
label={link.label}
|
||||
icon={link.icon}
|
||||
animationDuration={animationDuration}
|
||||
collapsed={collapsed}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
})}
|
||||
</div>
|
||||
|
||||
<div id="btmNavLinks">
|
||||
{navConfig.navLinks.map((link, index) => {
|
||||
if (link.navLocation === "bottom") {
|
||||
const activeLink = pathName === link.href;
|
||||
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className="px-5 text-muted-foreground transition-all duration-300 hover:text-foreground"
|
||||
>
|
||||
<LinkComponent
|
||||
activeLink={activeLink}
|
||||
href={link.href}
|
||||
label={link.label}
|
||||
icon={link.icon}
|
||||
animationDuration={animationDuration}
|
||||
collapsed={collapsed}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default NavLinks;
|
||||
Loading…
Add table
Add a link
Reference in a new issue