@xyo-network/react-webapp 2.37.0 → 2.37.2

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.
@@ -6,7 +6,6 @@ export interface WebAppBodyProps extends FlexBoxProps {
6
6
  disableBreadcrumbGutter?: boolean;
7
7
  spacing?: string | number;
8
8
  scrollingBreakpoint?: Breakpoint;
9
- devMode?: boolean;
10
9
  }
11
10
  export declare const WebAppBody: React.FC<WebAppBodyProps>;
12
11
  //# sourceMappingURL=Body.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../src/components/Body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiC,MAAM,eAAe,CAAA;AACzE,OAAO,EAAE,YAAY,EAAwB,MAAM,uBAAuB,CAAA;AAC1E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAwDxC,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,mBAAmB,CAAC,EAAE,UAAU,CAAA;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA+BhD,CAAA"}
1
+ {"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../src/components/Body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiC,MAAM,eAAe,CAAA;AACzE,OAAO,EAAE,YAAY,EAAwB,MAAM,uBAAuB,CAAA;AAC1E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAwDxC,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,mBAAmB,CAAC,EAAE,UAAU,CAAA;CACjC;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoBhD,CAAA"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { experimental_sx as sx, styled } from '@mui/material';
3
3
  import { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox';
4
4
  const WebAppBodyName = 'WebAppBody';
5
- const propsNotForwarded = ['scrollingBreakpoint', 'spacing'];
5
+ const propsNotForwarded = ['scrollingBreakpoint', 'spacing', 'disableBreadcrumbGutter'];
6
6
  const defaultStyledOptions = {
7
7
  shouldForwardProp: (prop) => !propsNotForwarded.includes(prop),
8
8
  };
@@ -46,13 +46,7 @@ const WebAppBodyScrollable = styled(FlexGrowCol, {
46
46
  position: 'relative',
47
47
  },
48
48
  }));
49
- export const WebAppBody = ({ devMode, children, breadcrumbs, disableBreadcrumbGutter, scrollingBreakpoint, spacing = 1, ...props }) => {
50
- // console.log(spacing)
51
- if (devMode) {
52
- return (_jsxs(WebAppBodyRoot, { scrollingBreakpoint: scrollingBreakpoint, spacing: spacing, ...props, children: [_jsx(WebAppBodyBreadcrumb, { disableBreadcrumbGutter: disableBreadcrumbGutter, spacing: spacing, children: breadcrumbs }), _jsx(WebAppBodyScrollableWrapper, { children: _jsx(WebAppBodyScrollable, { scrollingBreakpoint: scrollingBreakpoint, children: children }) })] }));
53
- }
54
- else {
55
- return (_jsxs(FlexGrowCol, { gap: 1, paddingY: spacing, justifyContent: "flex-start", alignItems: "stretch", ...props, children: [_jsx(FlexRow, { justifyContent: "flex-start", marginX: disableBreadcrumbGutter ? 0 : spacing, children: breadcrumbs }), children] }));
56
- }
49
+ export const WebAppBody = ({ children, breadcrumbs, disableBreadcrumbGutter, scrollingBreakpoint, spacing = 1, ...props }) => {
50
+ return (_jsxs(WebAppBodyRoot, { scrollingBreakpoint: scrollingBreakpoint, spacing: spacing, ...props, children: [breadcrumbs ? (_jsx(WebAppBodyBreadcrumb, { disableBreadcrumbGutter: disableBreadcrumbGutter, spacing: spacing, children: breadcrumbs })) : null, _jsx(WebAppBodyScrollableWrapper, { children: _jsx(WebAppBodyScrollable, { scrollingBreakpoint: scrollingBreakpoint, children: children }) })] }));
57
51
  };
58
52
  //# sourceMappingURL=Body.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Body.js","sourceRoot":"","sources":["../../../src/components/Body.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAc,eAAe,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACzE,OAAO,EAAgB,WAAW,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAG1E,MAAM,cAAc,GAAG,YAAY,CAAA;AACnC,MAAM,iBAAiB,GAAG,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAA;AAC5D,MAAM,oBAAoB,GAAG;IAC3B,iBAAiB,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC;CACvE,CAAA;AAED,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,EAAE;IACzC,GAAG,oBAAoB;IACvB,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,MAAM;CACb,CAAC,CAAkB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,mBAAmB,GAAG,IAAI,EAAE,EAAE,EAAE,CACrE,EAAE,CAAC;IACD,UAAU,EAAE,SAAS;IACrB,GAAG,EAAE,CAAC;IACN,cAAc,EAAE,YAAY;IAC5B,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,OAAO;IACjB,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE;QAC7C,QAAQ,EAAE,QAAQ;KACnB;CACF,CAAC,CACH,CAAA;AA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ASH,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,WAAW,EACX,uBAAuB,EACvB,mBAAmB,EACnB,OAAO,GAAG,CAAC,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,MAAC,cAAc,IAAC,mBAAmB,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,KAAM,KAAK,aAClF,WAAW,CAAC,CAAC,CAAC,CACb,KAAC,oBAAoB,IAAC,uBAAuB,EAAE,uBAAuB,EAAE,OAAO,EAAE,OAAO,YACrF,WAAW,GACS,CACxB,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,2BAA2B,cAC1B,KAAC,oBAAoB,IAAC,mBAAmB,EAAE,mBAAmB,YAAG,QAAQ,GAAwB,GACrE,IACf,CAClB,CAAA;AACH,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/components/Page.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,cAAc,EAAU,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,YAAY,EAAe,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAkB,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInE,OAAO,EAAc,eAAe,EAAE,MAAM,QAAQ,CAAA;AAkBpD,MAAM,WAAW,eAAgB,SAAQ,eAAe,EAAE,YAAY;IACpE,SAAS,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,MAAM,CAAA;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,CAAC,CA4F9D,CAAA;AAED,6CAA6C;AAC7C,eAAO,MAAM,QAAQ,mDAAa,CAAA"}
1
+ {"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/components/Page.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,cAAc,EAAU,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,YAAY,EAAe,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAkB,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInE,OAAO,EAAc,eAAe,EAAE,MAAM,QAAQ,CAAA;AAkBpD,MAAM,WAAW,eAAgB,SAAQ,eAAe,EAAE,YAAY;IACpE,SAAS,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,MAAM,CAAA;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,CAAC,CAoD9D,CAAA;AAED,6CAA6C;AAC7C,eAAO,MAAM,QAAQ,mDAAa,CAAA"}
@@ -21,7 +21,7 @@ const WebAppPageRoot = styled(FlexGrowCol, {
21
21
  position: 'absolute',
22
22
  },
23
23
  }));
24
- export const WebAppPage = ({ disableGutters, disableBreadcrumbGutter, title, container, children, breadcrumbs, scrollingBreakpoint, devMode, ...props }) => {
24
+ export const WebAppPage = ({ disableGutters, disableBreadcrumbGutter, title, container, children, breadcrumbs, scrollingBreakpoint, ...props }) => {
25
25
  const userEvents = useUserEvents();
26
26
  const { pathname } = useLocation();
27
27
  useAsyncEffect(
@@ -29,12 +29,7 @@ export const WebAppPage = ({ disableGutters, disableBreadcrumbGutter, title, con
29
29
  async () => {
30
30
  await userEvents?.viewContent({ name: title ?? 'NodeBasePage', path: location.pathname });
31
31
  }, [pathname, title, userEvents]);
32
- if (devMode) {
33
- return (_jsxs(WebAppPageRoot, { scrollingBreakpoint: scrollingBreakpoint, ...props, children: [_jsx(Helmet, { title: title }), container && container !== 'none' ? (_jsx(Container, { disableGutters: disableGutters, style: { alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }, maxWidth: container, children: _jsx(WebAppBody, { devMode: devMode, disableBreadcrumbGutter: disableBreadcrumbGutter, breadcrumbs: breadcrumbs, scrollingBreakpoint: scrollingBreakpoint, ...props, children: children }) })) : (_jsx(WebAppBody, { devMode: devMode, disableBreadcrumbGutter: disableBreadcrumbGutter, breadcrumbs: breadcrumbs, scrollingBreakpoint: scrollingBreakpoint, paddingX: disableGutters ? 0 : 1, ...props, children: children }))] }));
34
- }
35
- else {
36
- return (_jsxs(FlexGrowCol, { alignItems: "stretch", justifyContent: "flex-start", minHeight: 0, maxWidth: "100vw", overflow: "visible scroll", children: [_jsx(Helmet, { title: title }), container && container !== 'none' ? (_jsx(Container, { disableGutters: disableGutters, style: { alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }, maxWidth: container, children: _jsx(WebAppBody, { devMode: devMode, disableBreadcrumbGutter: disableBreadcrumbGutter, breadcrumbs: breadcrumbs, scrollingBreakpoint: scrollingBreakpoint, paddingX: disableGutters ? 0 : 1, ...props, children: children }) })) : (_jsx(WebAppBody, { devMode: devMode, disableBreadcrumbGutter: disableBreadcrumbGutter, breadcrumbs: breadcrumbs, scrollingBreakpoint: scrollingBreakpoint, paddingX: disableGutters ? 0 : 1, ...props, children: children }))] }));
37
- }
32
+ return (_jsxs(WebAppPageRoot, { scrollingBreakpoint: scrollingBreakpoint, ...props, children: [_jsx(Helmet, { title: title }), container && container !== 'none' ? (_jsx(Container, { disableGutters: disableGutters, style: { alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }, maxWidth: container, children: _jsx(WebAppBody, { disableBreadcrumbGutter: disableBreadcrumbGutter, breadcrumbs: breadcrumbs, scrollingBreakpoint: scrollingBreakpoint, ...props, children: children }) })) : (_jsx(WebAppBody, { disableBreadcrumbGutter: disableBreadcrumbGutter, breadcrumbs: breadcrumbs, scrollingBreakpoint: scrollingBreakpoint, paddingX: disableGutters ? 0 : 1, ...props, children: children }))] }));
38
33
  };
39
34
  /** @deprecated use WebAppPagePage instead */
40
35
  export const FlexPage = WebAppPage;
@@ -1 +1 @@
1
- {"version":3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mB,KAAM,KAAK,aACjE,KAAC,MAAM,IAAC,KAAK,EAAE,KAAK,GAAI,EACvB,SAAS,IAAI,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CACnC,KAAC,SAAS,IACR,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,cAAc,EAAE,YAAY,EAAE,EACrH,QAAQ,EAAE,SAAS,YAEnB,KAAC,UAAU,IACT,uBAAuB,EAAE,uBAAuB,EAChD,WAAW,EAAE,WAAW,EACxB,mBAAmB,EAAE,mBAAmB,KACpC,KAAK,YAER,QAAQ,GACE,GACH,CACb,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IACT,uBAAuB,EAAE,uBAAuB,EAChD,WAAW,EAAE,WAAW,EACxB,mBAAmB,EAAE,mBAAmB,EACxC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAC5B,KAAK,YAER,QAAQ,GACE,CACd,IACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,6CAA6C;AAC7C,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAA"}
package/package.json CHANGED
@@ -10,14 +10,14 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/react-button": "^2.14.20",
14
- "@xylabs/react-flexbox": "^2.14.20",
15
- "@xylabs/react-pixel": "^2.14.20",
16
- "@xylabs/react-shared": "^2.14.20",
17
- "@xyo-network/react-app-settings": "^2.37.0",
18
- "@xyo-network/react-appbar": "^2.37.0",
19
- "@xyo-network/react-footer": "^2.37.0",
20
- "@xyo-network/react-shared": "^2.37.0",
13
+ "@xylabs/react-button": "^2.15.0",
14
+ "@xylabs/react-flexbox": "^2.15.0",
15
+ "@xylabs/react-pixel": "^2.15.0",
16
+ "@xylabs/react-shared": "^2.15.0",
17
+ "@xyo-network/react-app-settings": "^2.37.2",
18
+ "@xyo-network/react-appbar": "^2.37.2",
19
+ "@xyo-network/react-footer": "^2.37.2",
20
+ "@xyo-network/react-shared": "^2.37.2",
21
21
  "react-helmet": "^6.1.0",
22
22
  "tslib": "^2.4.0"
23
23
  },
@@ -78,5 +78,5 @@
78
78
  },
79
79
  "sideEffects": false,
80
80
  "types": "dist/esm/index.d.ts",
81
- "version": "2.37.0"
81
+ "version": "2.37.2"
82
82
  }
@@ -3,7 +3,7 @@ import { FlexBoxProps, FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'
3
3
  import React, { ReactNode } from 'react'
4
4
 
5
5
  const WebAppBodyName = 'WebAppBody'
6
- const propsNotForwarded = ['scrollingBreakpoint', 'spacing']
6
+ const propsNotForwarded = ['scrollingBreakpoint', 'spacing', 'disableBreadcrumbGutter']
7
7
  const defaultStyledOptions = {
8
8
  shouldForwardProp: (prop: string) => !propsNotForwarded.includes(prop),
9
9
  }
@@ -61,11 +61,9 @@ export interface WebAppBodyProps extends FlexBoxProps {
61
61
  disableBreadcrumbGutter?: boolean
62
62
  spacing?: string | number
63
63
  scrollingBreakpoint?: Breakpoint
64
- devMode?: boolean
65
64
  }
66
65
 
67
66
  export const WebAppBody: React.FC<WebAppBodyProps> = ({
68
- devMode,
69
67
  children,
70
68
  breadcrumbs,
71
69
  disableBreadcrumbGutter,
@@ -73,26 +71,16 @@ export const WebAppBody: React.FC<WebAppBodyProps> = ({
73
71
  spacing = 1,
74
72
  ...props
75
73
  }) => {
76
- // console.log(spacing)
77
- if (devMode) {
78
- return (
79
- <WebAppBodyRoot scrollingBreakpoint={scrollingBreakpoint} spacing={spacing} {...props}>
74
+ return (
75
+ <WebAppBodyRoot scrollingBreakpoint={scrollingBreakpoint} spacing={spacing} {...props}>
76
+ {breadcrumbs ? (
80
77
  <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>
81
78
  {breadcrumbs}
82
79
  </WebAppBodyBreadcrumb>
83
- <WebAppBodyScrollableWrapper>
84
- <WebAppBodyScrollable scrollingBreakpoint={scrollingBreakpoint}>{children}</WebAppBodyScrollable>
85
- </WebAppBodyScrollableWrapper>
86
- </WebAppBodyRoot>
87
- )
88
- } else {
89
- return (
90
- <FlexGrowCol gap={1} paddingY={spacing} justifyContent="flex-start" alignItems="stretch" {...props}>
91
- <FlexRow justifyContent="flex-start" marginX={disableBreadcrumbGutter ? 0 : spacing}>
92
- {breadcrumbs}
93
- </FlexRow>
94
- {children}
95
- </FlexGrowCol>
96
- )
97
- }
80
+ ) : null}
81
+ <WebAppBodyScrollableWrapper>
82
+ <WebAppBodyScrollable scrollingBreakpoint={scrollingBreakpoint}>{children}</WebAppBodyScrollable>
83
+ </WebAppBodyScrollableWrapper>
84
+ </WebAppBodyRoot>
85
+ )
98
86
  }
@@ -61,10 +61,10 @@ const Default = Template.bind({})
61
61
  Default.args = {}
62
62
 
63
63
  const DefaultSideBar = Template.bind({})
64
- DefaultSideBar.args = { children: <Children devMode />, navigationType: 'sidebar' }
64
+ DefaultSideBar.args = { children: <Children />, navigationType: 'sidebar' }
65
65
 
66
66
  const DefaultAlwaysScrollable = Template.bind({})
67
- DefaultAlwaysScrollable.args = { children: <Children devMode scrollingBreakpoint="xl" />, navigationType: 'sidebar' }
67
+ DefaultAlwaysScrollable.args = { children: <Children scrollingBreakpoint="xl" />, navigationType: 'sidebar' }
68
68
 
69
69
  export { Default, DefaultAlwaysScrollable, DefaultSideBar }
70
70
 
@@ -36,7 +36,6 @@ export const WebAppPage: React.FC<WithChildren<WebAppPageProps>> = ({
36
36
  children,
37
37
  breadcrumbs,
38
38
  scrollingBreakpoint,
39
- devMode,
40
39
  ...props
41
40
  }) => {
42
41
  const userEvents = useUserEvents()
@@ -50,76 +49,37 @@ export const WebAppPage: React.FC<WithChildren<WebAppPageProps>> = ({
50
49
  [pathname, title, userEvents],
51
50
  )
52
51
 
53
- if (devMode) {
54
- return (
55
- <WebAppPageRoot scrollingBreakpoint={scrollingBreakpoint} {...props}>
56
- <Helmet title={title} />
57
- {container && container !== 'none' ? (
58
- <Container
59
- disableGutters={disableGutters}
60
- style={{ alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }}
61
- maxWidth={container}
62
- >
63
- <WebAppBody
64
- devMode={devMode}
65
- disableBreadcrumbGutter={disableBreadcrumbGutter}
66
- breadcrumbs={breadcrumbs}
67
- scrollingBreakpoint={scrollingBreakpoint}
68
- {...props}
69
- >
70
- {children}
71
- </WebAppBody>
72
- </Container>
73
- ) : (
52
+ return (
53
+ <WebAppPageRoot scrollingBreakpoint={scrollingBreakpoint} {...props}>
54
+ <Helmet title={title} />
55
+ {container && container !== 'none' ? (
56
+ <Container
57
+ disableGutters={disableGutters}
58
+ style={{ alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }}
59
+ maxWidth={container}
60
+ >
74
61
  <WebAppBody
75
- devMode={devMode}
76
62
  disableBreadcrumbGutter={disableBreadcrumbGutter}
77
63
  breadcrumbs={breadcrumbs}
78
64
  scrollingBreakpoint={scrollingBreakpoint}
79
- paddingX={disableGutters ? 0 : 1}
80
65
  {...props}
81
66
  >
82
67
  {children}
83
68
  </WebAppBody>
84
- )}
85
- </WebAppPageRoot>
86
- )
87
- } else {
88
- return (
89
- <FlexGrowCol alignItems="stretch" justifyContent="flex-start" minHeight={0} maxWidth="100vw" overflow="visible scroll">
90
- <Helmet title={title} />
91
- {container && container !== 'none' ? (
92
- <Container
93
- disableGutters={disableGutters}
94
- style={{ alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }}
95
- maxWidth={container}
96
- >
97
- <WebAppBody
98
- devMode={devMode}
99
- disableBreadcrumbGutter={disableBreadcrumbGutter}
100
- breadcrumbs={breadcrumbs}
101
- scrollingBreakpoint={scrollingBreakpoint}
102
- paddingX={disableGutters ? 0 : 1}
103
- {...props}
104
- >
105
- {children}
106
- </WebAppBody>
107
- </Container>
108
- ) : (
109
- <WebAppBody
110
- devMode={devMode}
111
- disableBreadcrumbGutter={disableBreadcrumbGutter}
112
- breadcrumbs={breadcrumbs}
113
- scrollingBreakpoint={scrollingBreakpoint}
114
- paddingX={disableGutters ? 0 : 1}
115
- {...props}
116
- >
117
- {children}
118
- </WebAppBody>
119
- )}
120
- </FlexGrowCol>
121
- )
122
- }
69
+ </Container>
70
+ ) : (
71
+ <WebAppBody
72
+ disableBreadcrumbGutter={disableBreadcrumbGutter}
73
+ breadcrumbs={breadcrumbs}
74
+ scrollingBreakpoint={scrollingBreakpoint}
75
+ paddingX={disableGutters ? 0 : 1}
76
+ {...props}
77
+ >
78
+ {children}
79
+ </WebAppBody>
80
+ )}
81
+ </WebAppPageRoot>
82
+ )
123
83
  }
124
84
 
125
85
  /** @deprecated use WebAppPagePage instead */