diff --git a/app/components/chart-footnotes.tsx b/app/components/chart-footnotes.tsx index a82d086fc..f659fdd8f 100644 --- a/app/components/chart-footnotes.tsx +++ b/app/components/chart-footnotes.tsx @@ -1,7 +1,7 @@ import { Trans } from "@lingui/macro"; import { Box, Button, Link, Theme, Typography } from "@mui/material"; import { makeStyles } from "@mui/styles"; -import { useEffect, useMemo, useState } from "react"; +import { PropsWithChildren, useEffect, useMemo, useState } from "react"; import { useChartTablePreview } from "@/components/chart-table-preview"; import { DataDownloadMenu, RunSparqlQuery } from "@/components/data-download"; @@ -174,6 +174,12 @@ export const ChartFootnotes = ({ dangerouslySetInnerHTML={{ __html: dataCubeByIri.publisher }} > )} + {configKey && shareUrl && visualizeLinkText && ( + <> + {" "} + / {visualizeLinkText} + + )} ) : null} @@ -238,23 +244,12 @@ export const ChartFootnotes = ({ {sparqlEditorUrl && showSparqlQuery !== false && ( )} - {configKey && shareUrl && ( - + {configKey && shareUrl && !visualizeLinkText && ( + + + Created with visualize.admin.ch + + )} @@ -263,3 +258,18 @@ export const ChartFootnotes = ({ return null; } }; + +const LinkButton = (props: PropsWithChildren<{ href: string }>) => { + return ( +