Add stock search and detail pages with charts, dividends and shared event rows. Use verified ticker links for portfolio names and logos, numeric dates and refreshed account cards. Update the generated API contract.
21 lines
567 B
TypeScript
21 lines
567 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 };
|