chore: Update translations
This commit is contained in:
@ -56,7 +56,11 @@ const Markdown = forwardRef<HTMLDivElement, MarkdownProps>((props: MarkdownProps
|
|||||||
return <blockquote key={key}>{t.tokens ? t.tokens.map(renderToken) : t.raw}</blockquote>;
|
return <blockquote key={key}>{t.tokens ? t.tokens.map(renderToken) : t.raw}</blockquote>;
|
||||||
}
|
}
|
||||||
case "link": {
|
case "link": {
|
||||||
return <HyperText link={t.href} key={key}>{t.tokens ? t.tokens.map(renderToken) : t.raw}</HyperText>;
|
return (
|
||||||
|
<HyperText link={t.href} key={key}>
|
||||||
|
{t.tokens ? t.tokens.map(renderToken) : t.raw}
|
||||||
|
</HyperText>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
case "list": {
|
case "list": {
|
||||||
if (t.ordered) {
|
if (t.ordered) {
|
||||||
@ -80,7 +84,9 @@ const Markdown = forwardRef<HTMLDivElement, MarkdownProps>((props: MarkdownProps
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{(t.header as Tokens.TableCell[]).map((v, h_key) => (
|
{(t.header as Tokens.TableCell[]).map((v, h_key) => (
|
||||||
<th className="border" key={h_key}>{v.tokens ? v.tokens.map(renderToken) : v.text}</th>
|
<th className="border" key={h_key}>
|
||||||
|
{v.tokens ? v.tokens.map(renderToken) : v.text}
|
||||||
|
</th>
|
||||||
))}
|
))}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -88,7 +94,9 @@ const Markdown = forwardRef<HTMLDivElement, MarkdownProps>((props: MarkdownProps
|
|||||||
{(t.rows as Tokens.TableCell[][]).map((v, r_key) => (
|
{(t.rows as Tokens.TableCell[][]).map((v, r_key) => (
|
||||||
<tr key={r_key}>
|
<tr key={r_key}>
|
||||||
{v.map((d, d_key) => (
|
{v.map((d, d_key) => (
|
||||||
<td className="border px-2 py-1" key={d_key}>{d.tokens ? d.tokens.map(renderToken) : d.text}</td>
|
<td className="border px-2 py-1" key={d_key}>
|
||||||
|
{d.tokens ? d.tokens.map(renderToken) : d.text}
|
||||||
|
</td>
|
||||||
))}
|
))}
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
|
@ -36,25 +36,41 @@ export function Text({ content, tags, eventComponent, className }: TextProps) {
|
|||||||
link.type === NostrPrefix.Address ||
|
link.type === NostrPrefix.Address ||
|
||||||
link.type === NostrPrefix.Note
|
link.type === NostrPrefix.Note
|
||||||
) {
|
) {
|
||||||
return <Fragment key={key}>
|
return (
|
||||||
{eventComponent?.({ link })} </Fragment> ?? <EventEmbed link={link} key={key} />;
|
<Fragment key={key}>{eventComponent?.({ link })} </Fragment> ?? <EventEmbed link={link} key={key} />
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
return <Mention pubkey={link.id} key={key} />;
|
return <Mention pubkey={link.id} key={key} />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return <HyperText link={f.content} key={key}>{f.content}</HyperText>;
|
return (
|
||||||
|
<HyperText link={f.content} key={key}>
|
||||||
|
{f.content}
|
||||||
|
</HyperText>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
case "mention":
|
case "mention":
|
||||||
return <Mention pubkey={f.content} key={key} />;
|
return <Mention pubkey={f.content} key={key} />;
|
||||||
case "hashtag":
|
case "hashtag":
|
||||||
return <Link to={`/t/${f.content}`} key={key}>#{f.content}</Link>;
|
return (
|
||||||
|
<Link to={`/t/${f.content}`} key={key}>
|
||||||
|
#{f.content}
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
default: {
|
default: {
|
||||||
if (f.content.startsWith("lnurlp:")) {
|
if (f.content.startsWith("lnurlp:")) {
|
||||||
// LUD-17: https://github.com/lnurl/luds/blob/luds/17.md
|
// LUD-17: https://github.com/lnurl/luds/blob/luds/17.md
|
||||||
const url = new URL(f.content);
|
const url = new URL(f.content);
|
||||||
url.protocol = "https:";
|
url.protocol = "https:";
|
||||||
return <SendZapsDialog pubkey={undefined} lnurl={url.toString()} button={<Link to={""}>{f.content}</Link>} key={key} />;
|
return (
|
||||||
|
<SendZapsDialog
|
||||||
|
pubkey={undefined}
|
||||||
|
lnurl={url.toString()}
|
||||||
|
button={<Link to={""}>{f.content}</Link>}
|
||||||
|
key={key}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return f.content;
|
return f.content;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user