@truedat/bg 8.2.0 → 8.2.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/bg",
3
- "version": "8.2.0",
3
+ "version": "8.2.1",
4
4
  "description": "Truedat Web Business Glossary",
5
5
  "sideEffects": false,
6
6
  "module": "src/index.js",
@@ -48,7 +48,7 @@
48
48
  "@testing-library/jest-dom": "^6.6.3",
49
49
  "@testing-library/react": "^16.3.0",
50
50
  "@testing-library/user-event": "^14.6.1",
51
- "@truedat/test": "8.2.0",
51
+ "@truedat/test": "8.2.1",
52
52
  "identity-obj-proxy": "^3.0.0",
53
53
  "jest": "^29.7.0",
54
54
  "redux-saga-test-plan": "^4.0.6"
@@ -81,5 +81,5 @@
81
81
  "semantic-ui-react": "^3.0.0-beta.2",
82
82
  "swr": "^2.3.3"
83
83
  },
84
- "gitHead": "a0b6d89f64e82602a1f3c5e250691526fe0c558a"
84
+ "gitHead": "3008f4a5a734dc1f12e9f25a790542b56aed61d2"
85
85
  }
@@ -12,14 +12,20 @@ export const useLinksBulkUpdateStatus = () => {
12
12
  );
13
13
  };
14
14
 
15
- export const useLinksSearch = () => {
15
+ export const useLinksSearch = (params) => {
16
+ const query = queryString(params);
16
17
  return useSWRMutations(API_RELATIONS_SEARCH, (url, { arg }) =>
17
- apiJsonPost(url, arg)
18
+ apiJsonPost(`${url}${query}`, arg)
18
19
  );
19
20
  };
20
21
 
21
- export const useLinksFilters = () => {
22
+ export const useLinksFilters = (params) => {
23
+ const query = queryString(params);
22
24
  return useSWRMutations(API_RELATIONS_FILTERS, (url, { arg }) =>
23
- apiJsonPost(url, arg)
25
+ apiJsonPost(`${url}${query}`, arg)
24
26
  );
25
27
  };
28
+
29
+ const queryString = (params) => {
30
+ return params ? `?${new URLSearchParams(params).toString()}` : "";
31
+ };