@campxdev/shared 1.11.32-alpha.8 → 1.11.32-alpha.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": "1.11.32-alpha.8",
3
+ "version": "1.11.32-alpha.9",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -15,7 +15,13 @@ export const campxTenantKey = Cookies.get('campx_tenant')
15
15
  export const urlTenantKey = window.location.hostname.split('.')[0]
16
16
  export const instituitionKey = window.location.pathname.split('/')[1]
17
17
 
18
- export default function Providers({ children }: { children: ReactNode }) {
18
+ export default function Providers({
19
+ children,
20
+ baseName,
21
+ }: {
22
+ children: ReactNode
23
+ baseName?: string
24
+ }) {
19
25
  const localInstituitionKey = localStorage.getItem('institution_key')
20
26
 
21
27
  const getInstituitionKey = () => {
@@ -42,10 +48,10 @@ export default function Providers({ children }: { children: ReactNode }) {
42
48
  }
43
49
  }, [])
44
50
 
45
- const baseName = getInstituitionKey() ? `${getInstituitionKey()}` : ''
51
+ const defaultBaseName = getInstituitionKey() ? `${getInstituitionKey()}` : ''
46
52
 
47
53
  return (
48
- <BrowserRouter basename={baseName}>
54
+ <BrowserRouter basename={baseName ?? defaultBaseName}>
49
55
  <QueryClientProvider>
50
56
  <MuiThemeProvider>
51
57
  <ConfirmContextProvider>