swico 0.5.0-beta14 → 0.5.0-beta15
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
CHANGED
|
@@ -10,4 +10,12 @@ export declare const getHistory: (routerBase: ConfigRouterType['base'], routerTy
|
|
|
10
10
|
history: SwicoHistoryType;
|
|
11
11
|
originalHistory: import("history").HashHistory;
|
|
12
12
|
};
|
|
13
|
-
export declare const useLocation: () =>
|
|
13
|
+
export declare const useLocation: () => {
|
|
14
|
+
name: string;
|
|
15
|
+
path: string;
|
|
16
|
+
pathname: string;
|
|
17
|
+
search: string;
|
|
18
|
+
query: {};
|
|
19
|
+
hash: string;
|
|
20
|
+
params: {};
|
|
21
|
+
};
|
|
@@ -147,9 +147,19 @@ var compareURLPatterns = function (urlPatternWithValues, urlPatternWithParams) {
|
|
|
147
147
|
return true;
|
|
148
148
|
};
|
|
149
149
|
var useLocation = function () {
|
|
150
|
+
var _a;
|
|
150
151
|
var location = (0, react_router_dom_1.useLocation)();
|
|
151
152
|
var params = (0, react_router_dom_2.useParams)();
|
|
152
153
|
var search = location.search, hash = location.hash, pathname = location.pathname;
|
|
153
154
|
console.log('routes2', routes_1.routes);
|
|
155
|
+
return {
|
|
156
|
+
name: '',
|
|
157
|
+
path: '',
|
|
158
|
+
pathname: (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.pathname,
|
|
159
|
+
search: '',
|
|
160
|
+
query: {},
|
|
161
|
+
hash: '',
|
|
162
|
+
params: {}
|
|
163
|
+
};
|
|
154
164
|
};
|
|
155
165
|
exports.useLocation = useLocation;
|