mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 19:35:00 -05:00
fix(www): docs breadcrumb
This commit is contained in:
parent
3bc11d7397
commit
6833f07545
@ -35,7 +35,6 @@ import {
|
||||
BreadcrumbPage,
|
||||
BreadcrumbSeparator,
|
||||
} from "./ui/breadcrumb";
|
||||
import { allDocs } from "contentlayer/generated";
|
||||
|
||||
export default function TextFromPathname() {
|
||||
const pathname = usePathname();
|
||||
@ -136,27 +135,6 @@ export default function TextFromPathname() {
|
||||
</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