Skip to content

Commit a26d014

Browse files
committed
fix: update Example path to use basename for improved URL handling
1 parent 44bd43d commit a26d014

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/leva-controls/Examples.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useControls } from "leva";
44
import { jsx } from "leva-plugins/jsx";
55
import { keys } from "lodash";
66
import { client } from "queryClient";
7+
import { basename } from "utils";
78

89
const maps = import.meta.glob("/public/examples/*.map", {
910
query: "?url",
@@ -16,7 +17,7 @@ export function Examples() {
1617
value: (
1718
<QueryClientProvider client={client}>
1819
{keys(maps).map((k) => (
19-
<Example path={k} />
20+
<Example path={`/examples/${basename(k)}`} />
2021
))}
2122
</QueryClientProvider>
2223
),

0 commit comments

Comments
 (0)