Repository: refinedev/refine
File: packages/antd/src/components/breadcrumb/index.tsx (TypeScript)

Code before:
import { HomeOutlined } from "@ant-design/icons";

export type BreadcrumbProps = RefineBreadcrumbProps<AntdBreadcrumbProps>;

export const Breadcrumb: React.FC<BreadcrumbProps> = ({
  breadcrumbProps,
  showHome = true,
  hideIcons = false,
  meta,
  minItems = 1,
}) => {
  const routerType = useRouterType();
  const { breadcrumbs } = useBreadcrumb({
    meta,
  });
  const Link = useLink();
  const { Link: LegacyLink } = useRouterContext();
  const { hasDashboard } = useRefineContext();

  const { resources } = useResource();

  const rootRouteResource = matchResourceFromRoute("/", resources);

  const ActiveLink = routerType === "legacy" ? LegacyLink : Link;

  if (breadcrumbs.length < minItems) return null;

  const breadCrumbItems = breadcrumbs.map(({ label, icon, href }) => ({
    key: `breadcrumb-item-${label}`,
    title: (
      <div
        style={{
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          gap: 4,
        }}
      >
        {!hideIcons && icon}
        {href ? (
          <ActiveLink to={href}>{label}</ActiveLink>
        ) : (
          <span>{label}</span>
        )}
      </div>
    ),
  }));

  const getBreadcrumbItems = () => {
    if (showHome && (hasDashboard || rootRouteResource.found)) {
      return [

Review comment (suggestion):
- case 1: breadcrumbs.length = 0:  // both versions return null
- case 2: breadcrumbs.length = 1:  // old version returns null, new version shows
- case 3: breadcrumbs.length = 2:  // Both versions renders 

we have two options to fix case 2:
1. 
```suggestion
  if (breadcrumbs.length <= minItems) return null;
```
2. default should be set to 2 `minItems = 2`

I believe second option is better because it fits `minItems` name.

Code after:
import { HomeOutlined } from "@ant-design/icons";

export type BreadcrumbProps = RefineBreadcrumbProps<AntdBreadcrumbProps>;

export const Breadcrumb: React.FC<BreadcrumbProps> = ({
  breadcrumbProps,
  showHome = true,
  hideIcons = false,
  meta,
  minItems = 2,
}) => {
  const routerType = useRouterType();
  const { breadcrumbs } = useBreadcrumb({
    meta,
  });
  const Link = useLink();
  const { Link: LegacyLink } = useRouterContext();
  const { hasDashboard } = useRefineContext();

  const { resources } = useResource();

  const rootRouteResource = matchResourceFromRoute("/", resources);

  const ActiveLink = routerType === "legacy" ? LegacyLink : Link;

  if (breadcrumbs.length < minItems) return null;

  const breadCrumbItems = breadcrumbs.map(({ label, icon, href }) => ({
    key: `breadcrumb-item-${label}`,
    title: (
      <div
        style={{
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          gap: 4,
        }}
      >
        {!hideIcons && icon}
        {href ? (
          <ActiveLink to={href}>{label}</ActiveLink>
        ) : (
          <span>{label}</span>
        )}
      </div>
    ),
  }));

  const getBreadcrumbItems = () => {
    if (showHome && (hasDashboard || rootRouteResource.found)) {
      return [