26 lines
567 B
TypeScript
26 lines
567 B
TypeScript
import type { FC } from "react";
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { useBond } from "@/entities/bond";
|
|
|
|
import { BreadcrumbTrail } from "./BreadcrumbTrail";
|
|
|
|
type BondBreadcrumbsProps = { identifier: string };
|
|
|
|
const BondBreadcrumbs: FC<BondBreadcrumbsProps> = (props) => {
|
|
const { data } = useBond(props.identifier);
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<BreadcrumbTrail
|
|
items={[
|
|
{ label: t("bond.searchTitle"), to: "/bonds" },
|
|
{ label: data?.name ?? t("bond.instrument") },
|
|
]}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export { BondBreadcrumbs };
|