Skip to content

Commit

Permalink
Use allDatasets without 'disableExplore' flagging for data catalog pa…
Browse files Browse the repository at this point in the history
…ge (#837)

Fix the problem of the current GHG Instance that the datasets with the
`disableExplore` flag don't show up on the catalog page - for the
context, this flag was introduced because some datasets cannot use the
default explorer. ex.
https://earth.gov/ghgcenter/data-catalog/emit-ch4plume-v1

For the data catalog page, show all the datasets whether
'disableExplore' is flagged. (The 'explore' button won't show up anyway)
  • Loading branch information
hanbyul-here authored Feb 13, 2024
2 parents 2b381dd + 3a1dab0 commit c38cec8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/scripts/components/data-catalog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Subtitle } from '@devseed-ui/typography';
import { Button } from '@devseed-ui/button';
import { CollecticonXmarkSmall } from '@devseed-ui/collecticons';
import { VerticalDivider } from '@devseed-ui/toolbar';
import { datasets } from 'veda';

import DatasetMenu from './dataset-menu';

Expand Down Expand Up @@ -47,7 +48,8 @@ import {
TAXONOMY_TOPICS
} from '$utils/veda-data';
import { DatasetClassification } from '$components/common/dataset-classification';
import { allDatasets } from '$components/exploration/data-utils';

const allDatasetsForCatalog = Object.values(datasets).map((d) => d!.data);

const DatasetCount = styled(Subtitle)`
grid-column: 1 / -1;
Expand Down Expand Up @@ -135,7 +137,7 @@ function DataCatalog() {

const displayDatasets = useMemo(
() =>
prepareDatasets(allDatasets, {
prepareDatasets(allDatasetsForCatalog, {
search,
taxonomies,
sortField,
Expand Down Expand Up @@ -191,7 +193,7 @@ function DataCatalog() {
count={displayDatasets.length}
showCount={true}
/>{' '}
out of {allDatasets.length}.
out of {allDatasetsForCatalog.length}.
</span>
{isFiltering && (
<Button forwardedAs={Link} to={DATASETS_PATH} size='small'>
Expand Down

0 comments on commit c38cec8

Please sign in to comment.