Skip to content

Commit

Permalink
fix: Include dataSource in new visualization link
Browse files Browse the repository at this point in the history
  • Loading branch information
bprusinowski committed Dec 4, 2023
1 parent 9f88517 commit 6c31ab9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ You can also check the [release page](https://github.com/visualize-admin/visuali

- Features
- Localized cube landing pages are now supported (dcat:landingPage) 🌎
- Fixes
- Copying a link to a new visualization from a dataset preview now correctly includes a data source

# [3.24.2] - 2023-11-28

Expand Down
5 changes: 4 additions & 1 deletion app/browser/dataset-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { DataDownloadMenu, RunSparqlQuery } from "@/components/data-download";
import Flex from "@/components/flex";
import { HintRed, Loading, LoadingDataError } from "@/components/hint";
import { DataSource } from "@/config-types";
import { sourceToLabel } from "@/domain/datasource";
import { useDataCubesComponentsQuery } from "@/graphql/hooks";
import { useDataCubePreviewQuery } from "@/graphql/query-hooks";
import { DataCubePublicationStatus } from "@/graphql/resolver-types";
Expand Down Expand Up @@ -162,7 +163,9 @@ export const DataSetPreview = ({
{dataCubeByIri.title}
</Typography>
<Link
href={`/create/new?cube=${dataCubeByIri.iri}`}
href={`/create/new?cube=${
dataCubeByIri.iri
}&dataSource=${sourceToLabel(dataSource)}`}
passHref
legacyBehavior
>
Expand Down

0 comments on commit 6c31ab9

Please sign in to comment.