mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 09:15:58 +02:00
Renamed count to foldersDepth
This commit is contained in:
@@ -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 (
|
||||
<SC.BreadcrumbWrapper>
|
||||
<SC.LinkWrapper>
|
||||
@@ -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 (
|
||||
<SC.LinkWrapper key={item.path}>
|
||||
{ item.title }
|
||||
|
||||
Reference in New Issue
Block a user