@campxdev/shared 1.11.59 → 1.11.60

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.59",
3
+ "version": "1.11.60",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -29,7 +29,7 @@ export default function LayoutWrapper({
29
29
  }
30
30
  return (
31
31
  <ErrorBoundary>
32
- {!permissions.isHomePageEnabled && (
32
+ {window.innerWidth > 1024 && !permissions.isHomePageEnabled && (
33
33
  <StyledLeftNavContainer>
34
34
  <SideNav menuItems={menu as any[]} header={sideMenuHeader} />
35
35
  </StyledLeftNavContainer>
@@ -49,22 +49,18 @@ export default function LayoutWrapper({
49
49
  : 'calc(100vh - 64px)',
50
50
  }}
51
51
  >
52
- <>
53
- <IconButton
54
- color="inherit"
55
- aria-label="open drawer"
56
- onClick={handleDrawer}
57
- edge="start"
58
- sx={{
59
- mr: 0.5,
60
- ['@media (min-width: 760px)']: {
61
- display: 'none',
62
- },
63
- }}
64
- >
65
- <MenuIcon />
66
- </IconButton>
67
- {/* <Button
52
+ {window.innerWidth < 1024 && (
53
+ <>
54
+ <IconButton
55
+ color="inherit"
56
+ aria-label="open drawer"
57
+ onClick={handleDrawer}
58
+ edge="start"
59
+ sx={{ mr: 0.5 }}
60
+ >
61
+ <MenuIcon />
62
+ </IconButton>
63
+ {/* <Button
68
64
  onClick={() => {
69
65
  console.log('hi')
70
66
  }}
@@ -73,16 +69,16 @@ export default function LayoutWrapper({
73
69
  >
74
70
  <MenuIcon />
75
71
  </Button> */}
76
- <StyledDrawer
77
- variant={'temporary'}
78
- anchor="left"
79
- open={open}
80
- onClose={handleDrawer}
81
- >
82
- <SideNav menuItems={menu as any[]} header={sideMenuHeader} />
83
- </StyledDrawer>
84
- </>
85
-
72
+ <StyledDrawer
73
+ variant={'temporary'}
74
+ anchor="left"
75
+ open={open}
76
+ onClose={handleDrawer}
77
+ >
78
+ <SideNav menuItems={menu as any[]} header={sideMenuHeader} />
79
+ </StyledDrawer>
80
+ </>
81
+ )}
86
82
  <ErrorBoundary>{children}</ErrorBoundary>
87
83
  </StyledMainContentContainer>
88
84
  </ErrorBoundary>
@@ -48,18 +48,19 @@ export const StyledLeftNavContainer = muiStyled('aside')(({ theme }) => ({
48
48
  },
49
49
 
50
50
  zIndex: 100,
51
-
52
- ['@media (max-width: 760px)']: {
53
- display: 'none',
54
- },
55
51
  }))
56
52
 
57
53
  export const StyledMainContentContainer = muiStyled('main')(() => ({
58
- width: `calc(100% - ${sideNavWidth})`,
54
+ width:
55
+ window.innerWidth > 1024
56
+ ? `calc(100% - ${sideNavWidth})`
57
+ : '100% !important',
59
58
  height: `calc(100vh - ${headerHeight})`,
60
59
  position: 'fixed',
61
60
  top: headerHeight,
62
- left: sideNavWidth,
61
+ left: window.innerWidth > 1024 ? sideNavWidth : 0,
62
+ right: window.innerWidth > 1024 ? 'unset' : 0,
63
+ bottom: window.innerWidth > 1024 ? 'unset' : 0,
63
64
  overflowY: 'auto',
64
65
 
65
66
  '&::-webkit-scrollbar': {
@@ -75,13 +76,6 @@ export const StyledMainContentContainer = muiStyled('main')(() => ({
75
76
  },
76
77
  },
77
78
 
78
- ['@media (max-width: 760px)']: {
79
- left: 0,
80
- right: 0,
81
- bottom: 0,
82
- width: '100% !important',
83
- },
84
-
85
79
  // '&::-webkit-scrollbar': {
86
80
  // width: '0.6em',
87
81
  // height: '0.6em',