fix: disable image loading in chat
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Kieran 2024-03-13 19:59:43 +00:00
parent 345c1d58bf
commit 5e10b888dd
3 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import type { ReactNode } from "react";
import { ExternalLink } from "./external-link";
const FileExtensionRegex = /\.([\w]+)$/i;
//const FileExtensionRegex = /\.([\w]+)$/i;
interface HyperTextProps {
link: string;
@ -9,7 +9,7 @@ interface HyperTextProps {
}
export function HyperText({ link, children }: HyperTextProps) {
try {
/*try {
const url = new URL(link);
const extension = FileExtensionRegex.test(url.pathname.toLowerCase()) && RegExp.$1;
@ -40,11 +40,11 @@ export function HyperText({ link, children }: HyperTextProps) {
return <ExternalLink href={url.toString()}>{children || url.toString()}</ExternalLink>;
}
} else {
<ExternalLink href={link}>{children}</ExternalLink>;
return <ExternalLink href={link}>{children}</ExternalLink>;
}
} catch (error) {
console.error(error);
// Ignore the error.
}
}*/
return <ExternalLink href={link}>{children}</ExternalLink>;
}

View File

@ -208,7 +208,7 @@ export function ChatZap({ zap }: { zap: ParsedZap }) {
const isBig = zap.amount >= BIG_ZAP_THRESHOLD;
return (
<div className={`zap-container ${isBig ? "big-zap" : ""}`}>
<div className={`zap-container overflow-wrap ${isBig ? "big-zap" : ""}`}>
<div className="flex gap-1 items-center">
<Icon name="zap-filled" className="text-zap" />
<FormattedMessage

View File

@ -55,7 +55,7 @@ export function Text({ content, tags, eventComponent, className }: TextProps) {
url.protocol = "https:";
return <SendZapsDialog pubkey={undefined} lnurl={url.toString()} button={<Link to={""}>{f.content}</Link>} />;
}
return <span>{f.content}</span>;
return f.content;
}
}
}