@visns-studio/visns-components 5.1.11 → 5.1.12
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
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
78
78
|
},
|
|
79
79
|
"name": "@visns-studio/visns-components",
|
|
80
|
-
"version": "5.1.
|
|
80
|
+
"version": "5.1.12",
|
|
81
81
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
82
82
|
"main": "src/index.js",
|
|
83
83
|
"files": [
|
|
@@ -20,6 +20,15 @@ function Breadcrumb({ data, page }) {
|
|
|
20
20
|
? getNestedData(data, page.parentTitleKey)
|
|
21
21
|
: null;
|
|
22
22
|
|
|
23
|
+
// Function to handle titleKey when it's a nested path like 'event_detail.name'
|
|
24
|
+
const getTitleData = (data, titleKey) => {
|
|
25
|
+
if (typeof titleKey === 'string' && titleKey.includes('.')) {
|
|
26
|
+
const keys = titleKey.split('.'); // Split the nested path by "."
|
|
27
|
+
return getNestedData(data, keys); // Use getNestedData to fetch the nested value
|
|
28
|
+
}
|
|
29
|
+
return data[titleKey]; // If not nested, return the direct data
|
|
30
|
+
};
|
|
31
|
+
|
|
23
32
|
return (
|
|
24
33
|
<h1>
|
|
25
34
|
{page?.parentTitle && page?.parentUrl && (
|