diff --git a/src/components/AssetDownload/index.tsx b/src/components/AssetDownload/index.tsx index 7e110988e4d..f78ce0bb05d 100644 --- a/src/components/AssetDownload/index.tsx +++ b/src/components/AssetDownload/index.tsx @@ -5,13 +5,12 @@ import type { ImageProps, StaticImageData } from "next/image" import AssetDownloadArtist from "@/components/AssetDownload/AssetDownloadArtist" import AssetDownloadImage from "@/components/AssetDownload/AssetDownloadImage" +import { ButtonLink } from "@/components/ui/buttons/Button" +import { Flex, Stack } from "@/components/ui/flex" import { cn } from "@/lib/utils/cn" import { trackCustomEvent } from "@/lib/utils/matomo" -import { ButtonLink } from "../ui/buttons/Button" -import { Flex, Stack } from "../ui/flex" - import { useTranslation } from "@/hooks/useTranslation" type AssetDownloadProps = { @@ -41,7 +40,9 @@ const AssetDownload = ({ eventName: title, }) } + const imgSrc = (image as StaticImageData).src + const fileExtension = extname(imgSrc).slice(1) return ( - - {t("page-assets-download-download")} ( - {extname(imgSrc).slice(1).toUpperCase()}) + + {t("page-assets-download-download")} ({fileExtension.toUpperCase()}) {svgUrl && ( - + {t("page-assets-download-download")} (SVG) )}