@campxdev/shared 3.0.6 → 3.0.7
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 +3 -3
- package/src/contexts/Providers.tsx +11 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@campxdev/shared",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"main": "./exports.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "react-scripts start",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"react-toastify": "^9.0.1",
|
|
56
56
|
"styled-components": "^5.3.5",
|
|
57
57
|
"swiper": "^8.1.5",
|
|
58
|
-
"use-immer": "^0.
|
|
59
|
-
"yup": "^
|
|
58
|
+
"use-immer": "^0.8.1",
|
|
59
|
+
"yup": "^0.32.11"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@storybook/addon-actions": "^6.5.14",
|
|
@@ -11,15 +11,18 @@ import GlobalNetworkLoadingIndicator from '../components/ErrorBoundary/GlobalNet
|
|
|
11
11
|
import ErrorModalProvider from '../components/ErrorModalWrapper/ErrorModalWrapper'
|
|
12
12
|
import RootModal from './RootModal'
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const isDevelopment = process.env.NODE_ENV == 'development'
|
|
15
15
|
|
|
16
|
-
export const campxTenantKey =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export const
|
|
16
|
+
export const campxTenantKey = isDevelopment
|
|
17
|
+
? Cookies.get('campx_tenant')
|
|
18
|
+
: window.location.hostname.split('.')[0]
|
|
19
|
+
export const urlTenantKey = isDevelopment
|
|
20
|
+
? Cookies.get('campx_tenant')
|
|
21
|
+
: window.location.hostname.split('.')[0]
|
|
22
|
+
export const instituitionKey =
|
|
23
|
+
window.location.pathname.split('/')[1] != ''
|
|
24
|
+
? window.location.pathname.split('/')[1]
|
|
25
|
+
: Cookies.get('campx_institution')
|
|
23
26
|
|
|
24
27
|
export default function Providers({ children }: { children: ReactNode }) {
|
|
25
28
|
var baseName = '/'
|