We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95b07eb commit a15986eCopy full SHA for a15986e
src/components/BreadCrumbs.res
@@ -8,14 +8,17 @@ let make = () => {
8
9
<div className="w-full captions overflow-x-auto text-gray-60 mb-8">
10
{paths
11
- ->Array.mapWithIndex((path, i) =>
12
- <>
13
- <ReactRouter.Link.String key={path} to=path prefetch={#intent}>
+ ->Array.mapWithIndex((path, i) => {
+ let cumulativePath =
+ "/" ++ (paths->Array.slice(0, i + 1)->Array.joinWith("/"))
14
+
15
+ <React.Fragment key={cumulativePath}>
16
+ <ReactRouter.Link.String to=cumulativePath prefetch={#intent}>
17
{React.string(path->String.capitalize)}
18
</ReactRouter.Link.String>
19
{i == lastIndex ? React.null : React.string(" / ")}
- </>
- )
20
+ </React.Fragment>
21
+ })
22
->React.array}
23
</div>
24
}
0 commit comments