@kando-env/kando-ui 1.0.12 → 1.0.15
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.
|
@@ -94,6 +94,12 @@ var KandoNavbar = function KandoNavbar(_ref) {
|
|
|
94
94
|
|
|
95
95
|
var dispatch = (0, _reactRedux.useDispatch)();
|
|
96
96
|
|
|
97
|
+
var useQuery = function useQuery() {
|
|
98
|
+
return new URLSearchParams((0, _reactRouterDom.useLocation)().search);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
var query = useQuery();
|
|
102
|
+
|
|
97
103
|
var _useState9 = (0, _react.useState)({
|
|
98
104
|
edit: {
|
|
99
105
|
link: '',
|
|
@@ -236,7 +242,8 @@ var KandoNavbar = function KandoNavbar(_ref) {
|
|
|
236
242
|
};
|
|
237
243
|
|
|
238
244
|
(0, _react.useEffect)(function () {
|
|
239
|
-
|
|
245
|
+
var locale = query.get("locale") || 'en';
|
|
246
|
+
fetch("/data/menu_data.json?water_authority_id=".concat(waId, "&locale=").concat(locale)).then(function (response) {
|
|
240
247
|
return response.json();
|
|
241
248
|
}).then(function (json) {
|
|
242
249
|
setWaterAuthorities(json.water_authorities);
|