@campxdev/shared 1.6.8 → 1.6.10

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.6.8",
3
+ "version": "1.6.10",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -22,7 +22,7 @@ export function LoginForm({ loginUrl }: { loginUrl?: string }) {
22
22
  })
23
23
  Cookies.set('campx_tenant', res?.data?.subDomain)
24
24
  Cookies.set('campx_session_key', res.data?.token)
25
- window.location.reload()
25
+ window.location.href = window.location.origin + `/${res?.data?.subDomain}`
26
26
  } catch (err) {
27
27
  // eslint-disable-next-line no-console
28
28
  console.log(err)
@@ -99,7 +99,7 @@ export const CustomDialog = ({
99
99
  return (
100
100
  <Dialog
101
101
  PaperProps={{
102
- ...dialogProps.PaperProps,
102
+ ...dialogProps?.PaperProps,
103
103
  elevation: 2,
104
104
  sx: { borderRadius: '10px' },
105
105
  }}
@@ -109,7 +109,7 @@ export const CustomDialog = ({
109
109
  transitionDuration={140}
110
110
  TransitionComponent={Transition}
111
111
  sx={{
112
- ...dialogProps.sx,
112
+ ...dialogProps?.sx,
113
113
  '& .MuiBackdrop-root': { backgroundColor: 'rgba(0, 0, 0, 0.4)' },
114
114
  }}
115
115
  {...dialogProps}
@@ -86,11 +86,11 @@ export const CustomDrawer = ({
86
86
  onClose={onClose}
87
87
  open={open}
88
88
  PaperProps={{
89
- ...drawerProps.PaperProps,
89
+ ...drawerProps?.PaperProps,
90
90
  elevation: 2,
91
91
  }}
92
92
  sx={{
93
- ...drawerProps.sx,
93
+ ...drawerProps?.sx,
94
94
  zIndex: 500,
95
95
  '& .MuiDrawer-paper': {
96
96
  boxSizing: 'border-box',