@campxdev/shared 1.11.32-alpha.4 → 1.11.32-alpha.6
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
|
@@ -32,12 +32,9 @@ export default function InstitutionsDialog({ close }) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
const InstitutionCard = ({ institution }) => {
|
|
35
|
-
const urlTenantKey = window.location.hostname.split('.')[0]
|
|
36
35
|
const handleClick = () => {
|
|
37
36
|
localStorage.setItem('institution_key', institution?.code)
|
|
38
|
-
window.location.replace(
|
|
39
|
-
`${window.location.origin}/apps/home/${urlTenantKey}/${institution?.code}`,
|
|
40
|
-
)
|
|
37
|
+
window.location.replace(`${window.location.origin}/${institution?.code}`)
|
|
41
38
|
}
|
|
42
39
|
|
|
43
40
|
return (
|
package/src/config/axios.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { InstitutionsStore } from '../shared-state/InstitutionsStore'
|
|
|
7
7
|
|
|
8
8
|
const sessionKey = Cookies.get('campx_session_key')
|
|
9
9
|
const clientId = window.location.hostname.split('.')[0] ?? 'campx_dev'
|
|
10
|
-
const institutionId = window.location.pathname.split('/')[
|
|
10
|
+
const institutionId = window.location.pathname.split('/')[1] ?? 'campx_dev'
|
|
11
11
|
const openPaymentsKey = Cookies.get('campx_open_payments_key')
|
|
12
12
|
|
|
13
13
|
export const formatParams = (params) => {
|
package/src/hooks/useAuth.ts
CHANGED
|
@@ -64,7 +64,7 @@ const checkIsAdmin = (user) => {
|
|
|
64
64
|
return isAdmin ? 1 : 0
|
|
65
65
|
}
|
|
66
66
|
const getInstitutionKey = () => {
|
|
67
|
-
const instituitionKey = window.location.pathname.split('/')[
|
|
67
|
+
const instituitionKey = window.location.pathname.split('/')[1]
|
|
68
68
|
if (!instituitionKey) {
|
|
69
69
|
const localInstituitionKey = localStorage.getItem('institution_key')
|
|
70
70
|
if (localInstituitionKey) {
|