diff --git a/src/components/AssetDownload/AssetDownloadArtist.tsx b/src/components/AssetDownload/AssetDownloadArtist.tsx index 1de7487f7d6..483b44df0a6 100644 --- a/src/components/AssetDownload/AssetDownloadArtist.tsx +++ b/src/components/AssetDownload/AssetDownloadArtist.tsx @@ -1,9 +1,11 @@ import { useTranslation } from "next-i18next" -import { Flex } from "@chakra-ui/react" import Emoji from "@/components/Emoji" -import Link from "@/components/Link" -import Text from "@/components/OldText" + +import { cn } from "@/lib/utils/cn" + +import { Flex } from "../ui/flex" +import { BaseLink } from "../ui/Link" type AssetDownloadArtistProps = { artistName: string @@ -16,21 +18,13 @@ const AssetDownloadArtist = ({ }: AssetDownloadArtistProps) => { const { t } = useTranslation("page-assets") return ( - - + + {t("page-assets-download-artist")} - {artistUrl && {artistName}} - {!artistUrl && {artistName}} + {artistUrl && {artistName}} + {!artistUrl &&

{artistName}

}
) } diff --git a/src/components/AssetDownload/AssetDownloadImage.tsx b/src/components/AssetDownload/AssetDownloadImage.tsx index aa374017cf1..e5a7c0b58be 100644 --- a/src/components/AssetDownload/AssetDownloadImage.tsx +++ b/src/components/AssetDownload/AssetDownloadImage.tsx @@ -1,6 +1,7 @@ -import { Center } from "@chakra-ui/react" +import { ImageProps } from "next/image" -import { Image, type ImageProps } from "@/components/Image" +import { TwImage } from "../Image" +import { Center } from "../ui/flex" interface AssetDownloadImageProps { image: ImageProps["src"] @@ -8,8 +9,8 @@ interface AssetDownloadImageProps { } const AssetDownloadImage = ({ image, alt }: AssetDownloadImageProps) => ( -
- {alt} +
+
) diff --git a/src/components/AssetDownload/index.tsx b/src/components/AssetDownload/index.tsx index 613d8d9eceb..2cc141bf5dc 100644 --- a/src/components/AssetDownload/index.tsx +++ b/src/components/AssetDownload/index.tsx @@ -1,17 +1,18 @@ import { extname } from "path" -import type { StaticImageData } from "next/image" +import { BaseHTMLAttributes } from "react" +import type { ImageProps, StaticImageData } from "next/image" import { useTranslation } from "next-i18next" -import { Box, Flex, type FlexProps } from "@chakra-ui/react" import AssetDownloadArtist from "@/components/AssetDownload/AssetDownloadArtist" import AssetDownloadImage from "@/components/AssetDownload/AssetDownloadImage" -import { ButtonLink } from "@/components/Buttons" -import type { ImageProps } from "@/components/Image" -import OldHeading from "@/components/OldHeading" +import { cn } from "@/lib/utils/cn" import { trackCustomEvent } from "@/lib/utils/matomo" +import { ButtonLink } from "../ui/buttons/Button" +import { Flex, Stack } from "../ui/flex" + type AssetDownloadProps = { title: string alt: string @@ -19,7 +20,7 @@ type AssetDownloadProps = { artistUrl?: string image: ImageProps["src"] svgUrl?: string -} & FlexProps +} & BaseHTMLAttributes const AssetDownload = ({ alt, @@ -28,6 +29,7 @@ const AssetDownload = ({ image, svgUrl, title, + className, ...props }: AssetDownloadProps) => { const { t } = useTranslation(["page-assets"]) @@ -41,23 +43,18 @@ const AssetDownload = ({ const imgSrc = (image as StaticImageData).src return ( - - - {title} - - +

{title}

+
{artistName && ( )} - - +
+ )} -
+ ) }