fix: disable image loading in chat
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
345c1d58bf
commit
5e10b888dd
@ -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>;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user