@campxdev/shared 0.5.7 → 0.5.8

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": "@campxdev/shared",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -86,24 +86,24 @@ const DropDownMenu = ({path, title, icon, menuItems, permissionKey}) => {
86
86
  const [open, setOpen] = useState(false)
87
87
  const permissions = PermissionsStore.useState((s) => s).permissions
88
88
 
89
- const validateDropdownAccess = () => {
90
- if (accessIfNoKey && !permissions) return true
91
- let arr = []
89
+ // const validateDropdownAccess = () => {
90
+ // if (accessIfNoKey && !permissions) return true
91
+ // let arr = []
92
92
 
93
- for (let i = 0; i < menuItems.length; i++) {
94
- if (permissions[menuItems[i].permissionKey]) {
95
- arr.push(true)
96
- } else {
97
- arr.push(accessIfNoKey)
98
- }
99
- }
93
+ // for (let i = 0; i < menuItems.length; i++) {
94
+ // if (permissions[menuItems[i].permissionKey]) {
95
+ // arr.push(true)
96
+ // } else {
97
+ // arr.push(accessIfNoKey)
98
+ // }
99
+ // }
100
100
 
101
- return arr.includes(true)
102
- }
101
+ // return arr.includes(true)
102
+ // }
103
103
 
104
- const dropdownAccess = validateDropdownAccess()
104
+ // const dropdownAccess = validateDropdownAccess()
105
105
 
106
- if (!dropdownAccess) return null
106
+ // if (!dropdownAccess) return null
107
107
  return (
108
108
  <>
109
109
  <Box