fix: Disabled embeds regression

This commit is contained in:
Tom Moor
2023-12-15 09:34:59 -05:00
parent bd65a4f151
commit 1d0d4e4048
2 changed files with 8 additions and 5 deletions

View File

@@ -5,14 +5,17 @@ import { EmbedProps as Props } from "../embeds";
import Widget from "./Widget";
export default function DisabledEmbed(
props: Omit<Props, "matches"> & ThemeProps<DefaultTheme>
props: Omit<Props, "matches" | "attrs"> &
ThemeProps<DefaultTheme> & {
href: string;
}
) {
return (
<Widget
title={props.embed.name}
href={props.attrs.href}
title={props.embed.title}
href={props.href}
icon={props.embed.icon}
context={props.attrs.href.replace(/^https?:\/\//, "")}
context={props.href.replace(/^https?:\/\//, "")}
isSelected={props.isSelected}
theme={props.theme}
>

View File

@@ -30,7 +30,7 @@ const EmbedComponent = ({
if (embedsDisabled) {
return (
<DisabledEmbed
attrs={node.attrs.href}
href={node.attrs.href}
embed={embed}
isEditable={isEditable}
isSelected={isSelected}