diff --git a/src/components/Breadcrumb/index.tsx b/src/components/Breadcrumb/index.tsx index fa147e9..0015236 100644 --- a/src/components/Breadcrumb/index.tsx +++ b/src/components/Breadcrumb/index.tsx @@ -32,7 +32,7 @@ function flatten([ export function Breadcrumb({ relativePath, basePath }: IBreadcrumbProps) { const paths = relativePath.split("/") const breadcrumbItems = flatten([traversePaths(paths, basePath)]) - let count = 0; + let foldersDepth = 0; return ( @@ -55,8 +55,8 @@ export function Breadcrumb({ relativePath, basePath }: IBreadcrumbProps) { {breadcrumbItems.map(item => { if (item.type === "folder") { - count++; - if (count > 1) { + foldersDepth++; + if (foldersDepth > 1) { return ( { item.title }