| 
1 | 1 | import { IJupyterGISModel, SelectionType } from '@jupytergis/schema';  | 
 | 2 | +import { PageConfig } from '@jupyterlab/coreutils';  | 
2 | 3 | import { IStateDB } from '@jupyterlab/statedb';  | 
3 | 4 | import { CommandRegistry } from '@lumino/commands';  | 
4 | 5 | import { MouseEvent as ReactMouseEvent } from 'react';  | 
@@ -30,11 +31,14 @@ interface ILeftPanelProps {  | 
30 | 31 | export const LeftPanel: React.FC<ILeftPanelProps> = (  | 
31 | 32 |   props: ILeftPanelProps,  | 
32 | 33 | ) => {  | 
 | 34 | +  const hideStacPanel = PageConfig.getOption('HIDE_STAC_PANEL') === 'true';  | 
 | 35 | + | 
33 | 36 |   const tabInfo = [  | 
34 | 37 |     { name: 'layers', title: 'Layers' },  | 
35 |  | -    { name: 'stac', title: 'Stac Browser' },  | 
 | 38 | +    ...(hideStacPanel ? [] : [{ name: 'stac', title: 'Stac Browser' }]),  | 
36 | 39 |     { name: 'filters', title: 'Filters' },  | 
37 | 40 |   ];  | 
 | 41 | + | 
38 | 42 |   const [curTab, setCurTab] = React.useState<string | undefined>(  | 
39 | 43 |     tabInfo[0].name,  | 
40 | 44 |   );  | 
@@ -71,9 +75,13 @@ export const LeftPanel: React.FC<ILeftPanelProps> = (  | 
71 | 75 |             state={props.state}  | 
72 | 76 |           ></LayersBodyComponent>  | 
73 | 77 |         </TabsContent>  | 
74 |  | -        <TabsContent value="stac">  | 
75 |  | -          <StacPanel model={props.model}></StacPanel>  | 
76 |  | -        </TabsContent>  | 
 | 78 | + | 
 | 79 | +        {!hideStacPanel && (  | 
 | 80 | +          <TabsContent value="stac">  | 
 | 81 | +            <StacPanel model={props.model}></StacPanel>  | 
 | 82 | +          </TabsContent>  | 
 | 83 | +        )}  | 
 | 84 | + | 
77 | 85 |         <TabsContent value="filters" className="jgis-panel-tab-content">  | 
78 | 86 |           <FilterComponent model={props.model}></FilterComponent>,  | 
79 | 87 |         </TabsContent>  | 
 | 
0 commit comments