@campxdev/shared 3.1.24-aplha.1 → 3.1.25

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": "3.1.24-aplha.1",
3
+ "version": "3.1.25",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -52,7 +52,7 @@ const RenderLink = ({ link, isActive }) => {
52
52
  return (
53
53
  <StyledLinkWrapper>
54
54
  {isProd &&
55
- window.location.hostname.split('.')[0] === link?.item?.appKey ? (
55
+ window.location.hostname.split('.')[0].split('--')[0] === link?.item?.appKey ? (
56
56
  <Link to={link?.item?.path} ref={reactLinkRef}>
57
57
  <StyledListItem isActive={isActive}>{link?.title}</StyledListItem>
58
58
  </Link>
@@ -13,7 +13,7 @@ declare module 'axios' {
13
13
 
14
14
  export const isDevelopment = window.location.hostname.includes('localhost')
15
15
 
16
- const tenantCode = window.location.hostname.split('.')[0]
16
+ const tenantCode = window.location.hostname.split('.')[0].split('--')[0]
17
17
  const institutionCode = window.location.pathname.split('/')[1]
18
18
 
19
19
  // Workspace to API endpoint prefix mapping
@@ -27,7 +27,7 @@ export const batchOptions = (() => {
27
27
  })
28
28
 
29
29
  // Check if current tenant has specific batch configuration
30
- const tenantConfig = tenantBatchConfig[window.location.hostname.split('.')[0]]
30
+ const tenantConfig = tenantBatchConfig[window.location.hostname.split('.')[0].split('--')[0]]
31
31
 
32
32
  if (tenantConfig) {
33
33
  const { batchConfigs } = tenantConfig
@@ -12,13 +12,13 @@ import RootModal from './RootModal'
12
12
 
13
13
  const isDevelopment = window.location.hostname.includes('localhost')
14
14
 
15
- export const campxTenantKey = window.location.hostname.split('.')[0]
16
- export const urlTenantKey = window.location.hostname.split('.')[0]
15
+ export const campxTenantKey = window.location.hostname.split('.')[0].split('--')[0]
16
+ export const urlTenantKey = window.location.hostname.split('.')[0].split('--')[0]
17
17
  export const instituitionKey = window.location.pathname.split('/')[1]
18
18
 
19
19
  export default function Providers({ children }: { children: ReactNode }) {
20
20
  var baseName = '/'
21
- var tenantCode = window.location.hostname.split('.')[0]
21
+ var tenantCode = window.location.hostname.split('.')[0].split('--')[0]
22
22
  var institutionCode = window.location.pathname.split('/')[1]
23
23
 
24
24
  if (institutionCode && window.location.pathname !== '/auth/login') {