turkmen-expo/components/ui/bread-crumbs.tsx

37 lines
691 B
TypeScript

"use client";
import { useTranslations } from "next-intl";
import { Link } from "@/i18n/navigation";
export const BreadCrumbs = ({
second,
third,
path,
path2,
cursor = false,
}: {
second: string;
third?: string;
path?: string;
path2?: string;
cursor?: boolean;
}) => {
const t = useTranslations("common");
return (
<div className="text-[12px] text-[#6B7674] flex items-center mob:mb-6 mb-5">
<Link href={"/"}>
{t("home")}
</Link>
<p className="px-1">/</p>
{third ? <Link href={path ? path : ""}>{second}</Link> : <p>{second}</p>}
{third && <p className="px-1">/</p>}
{third && <p>{third}</p>}
</div>
);
};