@tschk/moonshine-waku 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/router.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tschk/moonshine-waku",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "Waku client router API reimplemented on moonshine — drop waku, keep the imports",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"./aliases": "./src/aliases.ts"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@tschk/moonshine": "^0.3.
|
|
19
|
-
"@tschk/moonshine-router": "^0.3.
|
|
18
|
+
"@tschk/moonshine": "^0.3.6",
|
|
19
|
+
"@tschk/moonshine-router": "^0.3.6"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"react": ">=18",
|
package/src/router.ts
CHANGED
|
@@ -61,7 +61,8 @@ function useRerender(): () => void {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export function useRoute(): RouteProps {
|
|
64
|
-
|
|
64
|
+
// The location signal carries the query too; the path is its first half.
|
|
65
|
+
const pathname = useLocation().split("?")[0];
|
|
65
66
|
const search = browserPart("search");
|
|
66
67
|
const hash = browserPart("hash");
|
|
67
68
|
return useMemo(
|