From 3e98ab7bda5427364620ce1e6a387992f401713c Mon Sep 17 00:00:00 2001
From: Anirban Biswas <139000437+Rustix69@users.noreply.github.com>
Date: Wed, 15 Jan 2025 21:32:20 +0530
Subject: [PATCH] Fix : DOM Nesting in BreadCrumbs.tsx (#9942)
---
src/components/Common/Breadcrumbs.tsx | 125 +++++++++++++-------------
1 file changed, 64 insertions(+), 61 deletions(-)
diff --git a/src/components/Common/Breadcrumbs.tsx b/src/components/Common/Breadcrumbs.tsx
index 5437db0336d..72951c5a98e 100644
--- a/src/components/Common/Breadcrumbs.tsx
+++ b/src/components/Common/Breadcrumbs.tsx
@@ -7,7 +7,6 @@ import {
Breadcrumb,
BreadcrumbItem,
BreadcrumbList,
- BreadcrumbSeparator,
} from "@/components/ui/breadcrumb";
import { Button } from "@/components/ui/button";
import {
@@ -82,15 +81,24 @@ export default function Breadcrumbs({
const renderCrumb = (crumb: any, index: number) => {
const isLastItem = index === crumbs!.length - 1;
return (
-
-
- {isLastItem && {crumb.name}}
+ {!isLastItem ? (
+
+ ) : (
+ {crumb.name}
+ )}
-
+
);
};
@@ -98,72 +106,67 @@ export default function Breadcrumbs({