@campxdev/shared 1.11.57 → 1.11.59

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.57",
3
+ "version": "1.11.59",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -27,24 +27,40 @@ export default function LayoutWrapper({
27
27
  console.log('hi')
28
28
  setOpen(!open)
29
29
  }
30
-
31
- console.log(window.innerWidth)
32
30
  return (
33
31
  <ErrorBoundary>
34
- {window.innerWidth > 1024 && !permissions.isHomePageEnabled && (
32
+ {!permissions.isHomePageEnabled && (
35
33
  <StyledLeftNavContainer>
36
34
  <SideNav menuItems={menu as any[]} header={sideMenuHeader} />
37
35
  </StyledLeftNavContainer>
38
36
  )}
39
37
 
40
- {window.innerWidth < 1024 && (
38
+ <StyledMainContentContainer
39
+ style={{
40
+ width: permissions.isHomePageEnabled
41
+ ? 'inherit'
42
+ : 'calc(100% - 220px)',
43
+ position: permissions.isHomePageEnabled ? 'unset' : 'fixed',
44
+ marginTop: permissions.isHomePageEnabled ? '10px' : '0px',
45
+ borderRadius: permissions.isHomePageEnabled ? '10px' : '0px',
46
+ border: permissions.isHomePageEnabled ? '1px solid #1212' : 'none',
47
+ height: permissions.isHomePageEnabled
48
+ ? 'calc(100vh - 74px)'
49
+ : 'calc(100vh - 64px)',
50
+ }}
51
+ >
41
52
  <>
42
53
  <IconButton
43
54
  color="inherit"
44
55
  aria-label="open drawer"
45
56
  onClick={handleDrawer}
46
57
  edge="start"
47
- sx={{ mr: 0.5 }}
58
+ sx={{
59
+ mr: 0.5,
60
+ ['@media (min-width: 760px)']: {
61
+ display: 'none',
62
+ },
63
+ }}
48
64
  >
49
65
  <MenuIcon />
50
66
  </IconButton>
@@ -66,22 +82,7 @@ export default function LayoutWrapper({
66
82
  <SideNav menuItems={menu as any[]} header={sideMenuHeader} />
67
83
  </StyledDrawer>
68
84
  </>
69
- )}
70
85
 
71
- <StyledMainContentContainer
72
- style={{
73
- width: permissions.isHomePageEnabled
74
- ? 'inherit'
75
- : 'calc(100% - 220px)',
76
- position: permissions.isHomePageEnabled ? 'unset' : 'fixed',
77
- marginTop: permissions.isHomePageEnabled ? '10px' : '0px',
78
- borderRadius: permissions.isHomePageEnabled ? '10px' : '0px',
79
- border: permissions.isHomePageEnabled ? '1px solid #1212' : 'none',
80
- height: permissions.isHomePageEnabled
81
- ? 'calc(100vh - 74px)'
82
- : 'calc(100vh - 64px)',
83
- }}
84
- >
85
86
  <ErrorBoundary>{children}</ErrorBoundary>
86
87
  </StyledMainContentContainer>
87
88
  </ErrorBoundary>
@@ -48,6 +48,10 @@ export const StyledLeftNavContainer = muiStyled('aside')(({ theme }) => ({
48
48
  },
49
49
 
50
50
  zIndex: 100,
51
+
52
+ ['@media (max-width: 760px)']: {
53
+ display: 'none',
54
+ },
51
55
  }))
52
56
 
53
57
  export const StyledMainContentContainer = muiStyled('main')(() => ({