mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 15:54:58 -05:00
fix(www): docs breadcrumb
This commit is contained in:
parent
3bc11d7397
commit
6833f07545
@ -35,7 +35,6 @@ import {
|
|||||||
BreadcrumbPage,
|
BreadcrumbPage,
|
||||||
BreadcrumbSeparator,
|
BreadcrumbSeparator,
|
||||||
} from "./ui/breadcrumb";
|
} from "./ui/breadcrumb";
|
||||||
import { allDocs } from "contentlayer/generated";
|
|
||||||
|
|
||||||
export default function TextFromPathname() {
|
export default function TextFromPathname() {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
@ -136,27 +135,6 @@ export default function TextFromPathname() {
|
|||||||
</BreadcrumbItem>
|
</BreadcrumbItem>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{pathname?.startsWith("/docs/") && (
|
|
||||||
<>
|
|
||||||
<BreadcrumbSeparator className="max-sm:hidden" />
|
|
||||||
<BreadcrumbItem>Docs</BreadcrumbItem>
|
|
||||||
<BreadcrumbSeparator />
|
|
||||||
<BreadcrumbItem>
|
|
||||||
<BreadcrumbPage>
|
|
||||||
{
|
|
||||||
allDocs.find(
|
|
||||||
(c) =>
|
|
||||||
c._raw.flattenedPath ===
|
|
||||||
pathname
|
|
||||||
?.split("/")
|
|
||||||
.splice(2, pathname?.split("/").length)
|
|
||||||
.join("/")
|
|
||||||
)?.title
|
|
||||||
}
|
|
||||||
</BreadcrumbPage>
|
|
||||||
</BreadcrumbItem>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user