Skip to content

Commit 218869c

Browse files
fix(storybook): restore build by mocking useLocation (#16472)
1 parent e99d7a4 commit 218869c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/storybook/.storybook/mocks/solid-router.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ export function useNavigate() {
1111
return () => undefined
1212
}
1313

14+
export function useLocation() {
15+
return {
16+
pathname: "/story/session/story-session",
17+
search: "",
18+
hash: "",
19+
}
20+
}
21+
1422
export function MemoryRouter(props: ParentProps) {
1523
return props.children
1624
}

0 commit comments

Comments
 (0)