Skip to content

Commit

Permalink
fix condition, rename file
Browse files Browse the repository at this point in the history
  • Loading branch information
jolevesq committed Dec 12, 2024
1 parent 79facef commit 8f435e2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
8 changes: 4 additions & 4 deletions packages/geoview-core/src/core/app-start.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContext, Suspense, useMemo } from 'react';
import { createContext, StrictMode, Suspense, useMemo } from 'react';

import './translation/i18n';
import i18n from 'i18next';
Expand Down Expand Up @@ -81,9 +81,9 @@ function AppStart(props: AppStartProps): JSX.Element {
<I18nextProvider i18n={i18nInstance}>
<MapContext.Provider value={mapContextValue}>
<ThemeProvider theme={getTheme(theme)}>
{/* <StrictMode> */}
<Shell mapViewer={api.maps[mapId]} />
{/* </StrictMode> */}
<StrictMode>
<Shell mapViewer={api.maps[mapId]} />
</StrictMode>
</ThemeProvider>
</MapContext.Provider>
</I18nextProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { TypeFeatureInfoEntry, TypeGeometry, TypeLayerData } from '@/geo/map/map

import { LayerListEntry, Layout } from '@/core/components/common';
import { getSxClasses } from './details-style';
import { FeatureInfo } from './feature-info-new';
import { FeatureInfo } from './feature-info';
import { FEATURE_INFO_STATUS, TABS } from '@/core/utils/constant';
import { DetailsSkeleton } from './details-skeleton';

Expand Down Expand Up @@ -428,10 +428,12 @@ export function DetailsPanel({ fullWidth = false }: DetailsPanelType): JSX.Eleme
*/
const renderContent = (): JSX.Element | null => {
// If there is no layer, return null for the guide to show
if (memoLayersList && memoLayersList.length === 0) return null;
if ((memoLayersList && memoLayersList.length === 0) || selectedLayerPath === '') {
return null;
}

// Until process, return skeleton
if (!memoIsAllLayersQueryStatusProcessed() || !(memoSelectedLayerDataFeatures && memoSelectedLayerDataFeatures.length > 0)) {
// Until process or something found for selected layerPath, return skeleton
if (!memoIsAllLayersQueryStatusProcessed() && !(memoSelectedLayerDataFeatures && memoSelectedLayerDataFeatures.length > 0)) {
return <DetailsSkeleton />;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const FeatureHeader = memo(function FeatureHeader({ iconSrc, name, hasGeometry,
});

export function FeatureInfo({ feature }: FeatureInfoProps): JSX.Element | null {
logger.logTraceRender('components/details/feature-info-new');
logger.logTraceRender('components/details/feature-info');

// Hooks
const theme = useTheme();
Expand Down Expand Up @@ -171,7 +171,7 @@ export function FeatureInfo({ feature }: FeatureInfoProps): JSX.Element | null {

// Effects
useEffect(() => {
logger.logTraceUseEffect('FEATURE-INFO-NEW - checkedFeatures', checkedFeatures);
logger.logTraceUseEffect('FEATURE-INO - checkedFeatures', checkedFeatures);

if (!featureData?.uid) return;

Expand Down
8 changes: 4 additions & 4 deletions packages/geoview-core/src/geo/map/map-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ export class MapViewer {
});
}
}
}, 1000);
}, 250);
}

/**
Expand Down Expand Up @@ -692,7 +692,7 @@ export class MapViewer {
this.#checkMapLayersLoaded();
}
}
}, 1000);
}, 250);
}

/**
Expand Down Expand Up @@ -726,7 +726,7 @@ export class MapViewer {
this.#emitMapLayersLoaded();
}
}
}, 1000);
}, 250);
}

/**
Expand Down Expand Up @@ -761,7 +761,7 @@ export class MapViewer {
resolve();
}
}
}, 1000);
}, 250);
});
}

Expand Down

0 comments on commit 8f435e2

Please sign in to comment.