@@ -12,7 +12,11 @@ import {
12
12
MastheadMain ,
13
13
MastheadToggle ,
14
14
} from '@patternfly/react-core/dist/esm/components/Masthead' ;
15
- import { Page , PageToggleButton } from '@patternfly/react-core/dist/esm/components/Page' ;
15
+ import {
16
+ Page ,
17
+ PageSidebar ,
18
+ PageToggleButton ,
19
+ } from '@patternfly/react-core/dist/esm/components/Page' ;
16
20
import { Title } from '@patternfly/react-core/dist/esm/components/Title' ;
17
21
import { BarsIcon } from '@patternfly/react-icons/dist/esm/icons/bars-icon' ;
18
22
import ErrorBoundary from '~/app/error/ErrorBoundary' ;
@@ -25,6 +29,8 @@ import { NotebookContextProvider } from './context/NotebookContext';
25
29
import { isMUITheme , Theme } from './const' ;
26
30
import { BrowserStorageContextProvider } from './context/BrowserStorageContext' ;
27
31
32
+ const isStandalone = process . env . PRODUCTION !== 'true' ;
33
+
28
34
const App : React . FC = ( ) => {
29
35
useEffect ( ( ) => {
30
36
// Apply the theme based on the value of STYLE_THEME
@@ -43,14 +49,12 @@ const App: React.FC = () => {
43
49
< BarsIcon />
44
50
</ PageToggleButton >
45
51
</ MastheadToggle >
46
- { ! isMUITheme ( ) ? (
52
+ { ! isMUITheme ( ) && (
47
53
< MastheadBrand >
48
54
< MastheadLogo component = "a" >
49
55
< Brand src = { logoDarkTheme } alt = "Kubeflow" heights = { { default : '36px' } } />
50
56
</ MastheadLogo >
51
57
</ MastheadBrand >
52
- ) : (
53
- ''
54
58
) }
55
59
</ MastheadMain >
56
60
< MastheadContent >
@@ -63,6 +67,7 @@ const App: React.FC = () => {
63
67
</ MastheadContent >
64
68
</ Masthead >
65
69
) ;
70
+ const sidebar = < PageSidebar isSidebarOpen = { false } /> ;
66
71
67
72
return (
68
73
< ErrorBoundary >
@@ -71,10 +76,11 @@ const App: React.FC = () => {
71
76
< NamespaceContextProvider >
72
77
< Page
73
78
mainContainerId = "primary-app-container"
74
- masthead = { masthead }
79
+ masthead = { isStandalone ? masthead : '' }
75
80
isContentFilled
76
- isManagedSidebar
77
- sidebar = { < NavSidebar /> }
81
+ sidebar = { isStandalone ? < NavSidebar /> : sidebar }
82
+ isManagedSidebar = { isStandalone }
83
+ className = { isStandalone ? '' : 'embedded' }
78
84
>
79
85
< AppRoutes />
80
86
</ Page >
0 commit comments