26 lines
628 B
TypeScript
26 lines
628 B
TypeScript
"use client";
|
|
|
|
import Link from "next/link";
|
|
import { ISidebarLink } from "@/app/features/dashboard/sidebar/SidebarLink.interfaces";
|
|
import clsx from "clsx"; // Utility to merge class names
|
|
import "./PageLinks.scss";
|
|
|
|
interface IPageLinksProps extends ISidebarLink {
|
|
isShowIcon?: boolean;
|
|
}
|
|
|
|
export default function PageLinks({
|
|
title,
|
|
path,
|
|
icon: Icon,
|
|
}: IPageLinksProps) {
|
|
return (
|
|
<Link href={path} passHref legacyBehavior className="page-link">
|
|
<a className={clsx("page-link__container")}>
|
|
{Icon && <Icon />}
|
|
<span className="page-link__text">{title}</span>
|
|
</a>
|
|
</Link>
|
|
);
|
|
}
|