@campxdev/shared 0.2.7 → 0.2.9

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": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -22,7 +22,8 @@ const imageMap = {
22
22
  const isDev = process.env.NODE_ENV === 'development'
23
23
 
24
24
  export default function AppHeader({title}: {title?: string}) {
25
- const originSubdomain = window.location.origin.split('.')?.slice(-3)[0]
25
+ const originSubdomain = `https://www.exams.ums.in`.split('.')?.slice(-3)[0]
26
+ console.log(originSubdomain)
26
27
  const currentApp =
27
28
  applications.find((item) => item.key === originSubdomain)?.key ?? 'local'
28
29
 
@@ -6,7 +6,7 @@ import PersonRoundedIcon from '@mui/icons-material/PersonRounded'
6
6
 
7
7
  const isDev =
8
8
  process.env.NODE_ENV === 'development' ||
9
- window.location.origin.split('.').slice(-2)
9
+ window.location.origin.split('.').slice(-2).join('.') === 'campx.dev'
10
10
 
11
11
  const origins = {
12
12
  ums: {
@@ -4,7 +4,9 @@ import {toast} from 'react-toastify'
4
4
  import {globalStore} from '../shared-state/GlobalStore'
5
5
  import Cookies from 'js-cookie'
6
6
 
7
- const isDevelopment = process.env.NODE_ENV === 'development'
7
+ const isDevelopment =
8
+ process.env.NODE_ENV === 'development' ||
9
+ window.location.origin.split('.').slice(-2).join('.') === 'campx.dev'
8
10
  const sessionKey = Cookies.get('campx_session_key')
9
11
 
10
12
  const formatParams = (params) => {