All files / src/features/Events/EventDetail EventBreadcrumb.tsx

100% Statements 3/3
50% Branches 1/2
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26              8x 133x   133x                              
import GiveBreadcrumb from "@shared/Breadcrumbs/GiveBreadcrumb";
import { useAppTheme } from "@theme/v2/Provider";
 
/**
 * The "Events / {name}" trail — rendered in the banner flow on mobile and in
 * the sticky overlay bar on desktop (see EventDetailPage).
 */
const EventBreadcrumb = ({ name }: { name?: string }) => {
  const theme = useAppTheme();
 
  return (
    <GiveBreadcrumb
      items={[
        { label: "Events", path: "/merchant/events" },
        { label: name ?? "" },
      ]}
      customStyle={{
        activeColor: "primary",
        defaultColor: theme.palette.text?.secondary,
      }}
    />
  );
};
 
export default EventBreadcrumb;