Skip to content

Commit 44976ad

Browse files
committed
fix: normalize url with spaces
1 parent a6523f8 commit 44976ad

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/components/src/shared/showcase/link-wrapper.showcase.lite.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ export default function LinkWrapperShowcase(props: Props) {
3131
const params = new URLSearchParams(
3232
window.location.search || queryString
3333
);
34-
setPageParam(params.get('page'));
34+
35+
const rawPage = params.get('page');
36+
37+
const normalizedPage = rawPage
38+
? rawPage.replaceAll(' ', '+').toLowerCase()
39+
: null;
40+
41+
setPageParam(normalizedPage);
3542
}
3643
});
3744

0 commit comments

Comments
 (0)