@campxdev/shared 1.11.32-alpha.7 → 1.11.32-alpha.8

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.32-alpha.7",
3
+ "version": "1.11.32-alpha.8",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -63,7 +63,7 @@ export function LoginForm({
63
63
  })
64
64
  Cookies.set('campx_tenant', res?.data?.subDomain)
65
65
  Cookies.set('campx_session_key', res.data?.token)
66
- window.location.href = window.location.origin + `/${res?.data?.subDomain}`
66
+ window.location.href = window.location.origin
67
67
  } catch (err) {
68
68
  // eslint-disable-next-line no-console
69
69
  console.log(err)
@@ -38,15 +38,11 @@ export default function Providers({ children }: { children: ReactNode }) {
38
38
  window.location.replace(
39
39
  window.location.origin + `/${localInstituitionKey}`,
40
40
  )
41
- } else {
42
- window.location.replace(window.location.origin + `/${urlTenantKey}`)
43
41
  }
44
42
  }
45
43
  }, [])
46
44
 
47
- const baseName = getInstituitionKey()
48
- ? `${getInstituitionKey()}`
49
- : `${urlTenantKey}`
45
+ const baseName = getInstituitionKey() ? `${getInstituitionKey()}` : ''
50
46
 
51
47
  return (
52
48
  <BrowserRouter basename={baseName}>