Skip to content

Commit

Permalink
Adds option to hide dataset explore button
Browse files Browse the repository at this point in the history
  • Loading branch information
nerik committed Sep 20, 2023
1 parent dba8c2b commit d19a5b9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
18 changes: 10 additions & 8 deletions app/scripts/components/datasets/s-overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ function DatasetsOverview() {
title={`${dataset.data.name} Overview`}
description={dataset.data.description}
renderBetaBlock={() => (
<PageActions>
<PageActions>
{dataset?.data.disableExplore !== true && (
<Button
forwardedAs={Link}
to={getDatasetExplorePath(dataset.data)}
Expand All @@ -63,13 +64,14 @@ function DatasetsOverview() {
<CollecticonCompass />
Explore data
</Button>
<NotebookConnectButton
dataset={dataset.data}
size='large'
compact={false}
variation='achromic-outline'
/>
</PageActions>
)}
<NotebookConnectButton
dataset={dataset.data}
size='large'
compact={false}
variation='achromic-outline'
/>
</PageActions>
)}
renderDetailsBlock={() => (
<>
Expand Down
6 changes: 6 additions & 0 deletions docs/content/CONTENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ media: Media
thematics: string[]
sources: string[]
featured: boolean
disableExplore: boolean

layers: Layer[]
related: Related[]
Expand Down Expand Up @@ -109,6 +110,11 @@ taxonomy:
Whether this dataset is featured
![](./media/fm-featured-dataset.png)

**disableExplore**
`boolean`
When set to true, the 'explore data' section won't be available for this dataset.


**layers**
`Layer[]`
List of layers for this dataset. See [layer.md](./frontmatter/layer.md).
Expand Down
1 change: 1 addition & 0 deletions parcel-resolver-veda/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ declare module 'veda' {
media?: Media;
layers: DatasetLayer[];
related?: RelatedContentData[];
disableExplore?: boolean;
}

// ///////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit d19a5b9

Please sign in to comment.