Files
pse.dev/components/breadcrumbs.tsx
Kalidou Diagne 926cf9e5dd feat: research page (#316)
* feat: research page
2025-04-09 06:35:30 +01:00

31 lines
719 B
TypeScript

import NextLink from "next/link"
interface Props {
path: string[]
}
const Breadcrumbs = ({ path }: Props) => {
return (
<div className="flex text-[#4A5754]">
{path.map((item, index) => {
const isLastItem = index === path.length - 1
if (isLastItem) {
return (
<p key={index} className="cursor-pointer font-bold capitalize">
{item}
</p>
)
}
return (
<NextLink key={index} href={`/${item}`} className={"capitalize"}>
{item === "projects" ? "All Projects" : item}
<span className="mx-2">/</span>
</NextLink>
)
})}
</div>
)
}
export default Breadcrumbs