chore: Update translations
This commit is contained in:
@ -4,24 +4,25 @@ import { findTag } from "SnortUtils";
|
|||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
|
|
||||||
export function useStatusFeed(id?: string, leaveOpen = false) {
|
export function useStatusFeed(id?: string, leaveOpen = false) {
|
||||||
const sub = useMemo(() => {
|
const sub = useMemo(() => {
|
||||||
if(!id) return null;
|
if (!id) return null;
|
||||||
|
|
||||||
const rb = new RequestBuilder(`statud:${id}`);
|
const rb = new RequestBuilder(`statud:${id}`);
|
||||||
rb.withOptions({leaveOpen});
|
rb.withOptions({ leaveOpen });
|
||||||
rb.withFilter()
|
rb.withFilter()
|
||||||
.kinds([30315 as EventKind])
|
.kinds([30315 as EventKind])
|
||||||
.authors([id]);
|
.authors([id]);
|
||||||
|
|
||||||
return rb;
|
return rb;
|
||||||
}, [id]);
|
}, [id]);
|
||||||
|
|
||||||
const status = useRequestBuilder(NoteCollection, sub);
|
const status = useRequestBuilder(NoteCollection, sub);
|
||||||
|
|
||||||
const general = status.data?.find(a => findTag(a, "d") === "general");
|
const general = status.data?.find(a => findTag(a, "d") === "general");
|
||||||
const music = status.data?.find(a => findTag(a, "d") === "music");
|
const music = status.data?.find(a => findTag(a, "d") === "music");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
general, music
|
general,
|
||||||
}
|
music,
|
||||||
}
|
};
|
||||||
|
}
|
||||||
|
@ -256,13 +256,19 @@ export default function ProfilePage() {
|
|||||||
const link = findTag(status.music, "r");
|
const link = findTag(status.music, "r");
|
||||||
const cover = findTag(status.music, "cover");
|
const cover = findTag(status.music, "cover");
|
||||||
const inner = () => {
|
const inner = () => {
|
||||||
return <div className="flex g8">
|
return (
|
||||||
{cover && <ProxyImg src={cover} size={40} />}
|
<div className="flex g8">
|
||||||
<small>🎵 {unwrap(status.music).content}</small>
|
{cover && <ProxyImg src={cover} size={40} />}
|
||||||
</div>
|
<small>🎵 {unwrap(status.music).content}</small>
|
||||||
}
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
if (link) {
|
if (link) {
|
||||||
return <a href={link} rel="noreferer" target="_blank" className="ext">{inner()}</a>;
|
return (
|
||||||
|
<a href={link} rel="noreferer" target="_blank" className="ext">
|
||||||
|
{inner()}
|
||||||
|
</a>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return inner();
|
return inner();
|
||||||
}
|
}
|
||||||
@ -278,9 +284,7 @@ export default function ProfilePage() {
|
|||||||
{user?.nip05 && <Nip05 nip05={user.nip05} pubkey={user.pubkey} />}
|
{user?.nip05 && <Nip05 nip05={user.nip05} pubkey={user.pubkey} />}
|
||||||
</div>
|
</div>
|
||||||
{showBadges && <BadgeList badges={badges} />}
|
{showBadges && <BadgeList badges={badges} />}
|
||||||
{showStatus && <>
|
{showStatus && <>{musicStatus()}</>}
|
||||||
{musicStatus()}
|
|
||||||
</>}
|
|
||||||
<div className="link-section">
|
<div className="link-section">
|
||||||
<Copy text={npub} />
|
<Copy text={npub} />
|
||||||
{links()}
|
{links()}
|
||||||
@ -322,14 +326,14 @@ export default function ProfilePage() {
|
|||||||
targets={
|
targets={
|
||||||
lnurl?.lnurl && id
|
lnurl?.lnurl && id
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
type: "lnurl",
|
type: "lnurl",
|
||||||
value: lnurl?.lnurl,
|
value: lnurl?.lnurl,
|
||||||
weight: 1,
|
weight: 1,
|
||||||
name: user?.display_name || user?.name,
|
name: user?.display_name || user?.name,
|
||||||
zap: { pubkey: id },
|
zap: { pubkey: id },
|
||||||
} as ZapTarget,
|
} as ZapTarget,
|
||||||
]
|
]
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
show={showLnQr}
|
show={showLnQr}
|
||||||
|
Reference in New Issue
Block a user