diff --git a/src/Content/Embed/index.tsx b/src/Content/Embed/index.tsx index be7540a..809f549 100644 --- a/src/Content/Embed/index.tsx +++ b/src/Content/Embed/index.tsx @@ -60,9 +60,14 @@ function Embed({ embed, images }: EmbedProps) { - {embed.provider && ( - {embed.provider.name} - )} + {embed.provider && + (embed.provider.url ? ( + + {embed.provider.name} + + ) : ( + {embed.provider.name} + ))} {embed.author && ( {embed.author.proxy_icon_url && ( diff --git a/src/ExternalLink.tsx b/src/ExternalLink/index.tsx similarity index 54% rename from src/ExternalLink.tsx rename to src/ExternalLink/index.tsx index 3714dd6..b06a2d9 100644 --- a/src/ExternalLink.tsx +++ b/src/ExternalLink/index.tsx @@ -1,15 +1,16 @@ -import type { HTMLProps } from "react"; +import type { ComponentProps } from "react"; import React from "react"; -import { useConfig } from "./core/ConfigContext"; +import { useConfig } from "../core/ConfigContext"; +import * as Styles from "./style"; -function ExternalLink( - props: HTMLProps & - Required, "href">> -) { +type Props = ComponentProps & + Required, "href">>; + +function ExternalLink(props: Props) { const { externalLinkOpenRequested } = useConfig(); return ( -