@campxdev/shared 1.11.7-1.alpha.10 → 1.11.7-1.alpha.11

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.11.7-1.alpha.10",
3
+ "version": "1.11.7-1.alpha.11",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -61,6 +61,9 @@ export function LoginForm({
61
61
  ...deviceState.deviceInformation,
62
62
  },
63
63
  })
64
+ Cookies.remove('campx_session_key')
65
+ Cookies.remove('campx_tenant')
66
+ Cookies.remove('campx_institution')
64
67
  Cookies.set('campx_session_key', res.data?.token)
65
68
  Cookies.set('campx_tenant', res.data?.subDomain)
66
69
  Cookies.set('campx_institution', res.data?.institutionCode)
@@ -12,6 +12,7 @@ const tenantCode = isDevelopment
12
12
  const institutionCode = window.location.pathname.split('/')[1]
13
13
 
14
14
  const openPaymentsKey = Cookies.get('campx_open_payments_key')
15
+ console.log(openPaymentsKey)
15
16
 
16
17
  export const formatParams = (params) => {
17
18
  return Object.fromEntries(
@@ -26,7 +26,9 @@ export default function Providers({ children }: { children: ReactNode }) {
26
26
  var baseName = '/'
27
27
  var tenantCode
28
28
  var institutionCode =
29
- Cookies.get('campx_institution') ?? window.location.pathname.split('/')[1]
29
+ window.location.pathname.split('/')[1] != ''
30
+ ? window.location.pathname.split('/')[1]
31
+ : Cookies.get('campx_institution')
30
32
 
31
33
  if (isDevelopment) {
32
34
  tenantCode = Cookies.get('campx_tenant')