Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Include dataSource in new visualization link #1290

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading