@visns-studio/visns-components 5.2.1 → 5.2.2

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
@@ -78,7 +78,7 @@
78
78
  "react-dom": "^17.0.0 || ^18.0.0"
79
79
  },
80
80
  "name": "@visns-studio/visns-components",
81
- "version": "5.2.1",
81
+ "version": "5.2.2",
82
82
  "description": "Various packages to assist in the development of our Custom Applications.",
83
83
  "main": "src/index.js",
84
84
  "files": [
@@ -284,12 +284,11 @@ function GenericDetail({
284
284
  }
285
285
  };
286
286
 
287
- const handleExport = (config) => {
288
- if (config.url && config.key) {
289
- window.open(`${config.url}/${data[config.key]}`);
290
- } else {
291
- toast.error('Export URL not found');
292
- }
287
+ const handleExport = ({ url, key }) => {
288
+ if (!url) return toast.error('Export URL not found');
289
+
290
+ const exportUrl = key ? `${url}/${data[key]}` : url;
291
+ window.open(exportUrl);
293
292
  };
294
293
 
295
294
  const handleCheckboxUpdate = async () => {