@campxdev/shared 1.2.6 → 1.2.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": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -9,7 +9,7 @@ export default function ChangePassword({ close }) {
9
9
 
10
10
  const onSubmit = async (formData) => {
11
11
  try {
12
- await axios.post('/auth/change-password', formData)
12
+ await axios.post('/auth-server/auth/change-password', formData)
13
13
  toast.success('Password Changed Successfully')
14
14
  } catch (error) {
15
15
  axiosErrorToast(error)
@@ -38,9 +38,8 @@ export function LoginForm({ loginUrl }: { loginUrl?: string }) {
38
38
  try {
39
39
  const res = await axiosBase({
40
40
  method: 'POST',
41
- url: loginUrl
42
- ? loginUrl
43
- : `https://api.campx.dev/auth-server/auth/login`,
41
+ baseURL: process.env.REACT_APP_API_HOST,
42
+ url: loginUrl ? loginUrl : `/auth-server/auth/login`,
44
43
  data: values,
45
44
  })
46
45
  Cookies.set('campx_tenant', res?.data?.subDomain)
@@ -104,7 +104,7 @@ const DropDownMenu = ({ path, title, icon, menuItems }) => {
104
104
  const validateDropdownAccess = () => {
105
105
  if (process.env.NODE_ENV === 'development' && !permissions) return true
106
106
 
107
- return menuItems?.every((item) =>
107
+ return menuItems?.some((item) =>
108
108
  item?.permissionKey ? permissions[item.permissionKey] : accessIfNoKey,
109
109
  )
110
110
  }