26 lines
572 B
TypeScript
26 lines
572 B
TypeScript
import type { FC } from "react";
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { useStock } from "@/entities/stock";
|
|
|
|
import { BreadcrumbTrail } from "./BreadcrumbTrail";
|
|
|
|
type StockBreadcrumbsProps = { identifier: string };
|
|
|
|
const StockBreadcrumbs: FC<StockBreadcrumbsProps> = (props) => {
|
|
const { data } = useStock(props.identifier);
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<BreadcrumbTrail
|
|
items={[
|
|
{ label: t("stock.searchTitle"), to: "/stocks" },
|
|
{ label: data?.name ?? t("stock.share") },
|
|
]}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export { StockBreadcrumbs };
|