From 0b9c43cfed351127c7ccd883823f328e62c1bbc5 Mon Sep 17 00:00:00 2001 From: Kieran Date: Mon, 18 Sep 2023 09:08:07 +0000 Subject: [PATCH] chore: Update translations --- packages/app/src/Feed/StatusFeed.ts | 33 +++++++++++----------- packages/app/src/Pages/ProfilePage.tsx | 38 ++++++++++++++------------ 2 files changed, 38 insertions(+), 33 deletions(-) diff --git a/packages/app/src/Feed/StatusFeed.ts b/packages/app/src/Feed/StatusFeed.ts index aee300549..b84a3c987 100644 --- a/packages/app/src/Feed/StatusFeed.ts +++ b/packages/app/src/Feed/StatusFeed.ts @@ -4,24 +4,25 @@ import { findTag } from "SnortUtils"; import { useMemo } from "react"; export function useStatusFeed(id?: string, leaveOpen = false) { - const sub = useMemo(() => { - if(!id) return null; + const sub = useMemo(() => { + if (!id) return null; - const rb = new RequestBuilder(`statud:${id}`); - rb.withOptions({leaveOpen}); - rb.withFilter() - .kinds([30315 as EventKind]) - .authors([id]); + const rb = new RequestBuilder(`statud:${id}`); + rb.withOptions({ leaveOpen }); + rb.withFilter() + .kinds([30315 as EventKind]) + .authors([id]); - return rb; - }, [id]); + return rb; + }, [id]); - const status = useRequestBuilder(NoteCollection, sub); + const status = useRequestBuilder(NoteCollection, sub); - const general = status.data?.find(a => findTag(a, "d") === "general"); - const music = status.data?.find(a => findTag(a, "d") === "music"); + const general = status.data?.find(a => findTag(a, "d") === "general"); + const music = status.data?.find(a => findTag(a, "d") === "music"); - return { - general, music - } -} \ No newline at end of file + return { + general, + music, + }; +} diff --git a/packages/app/src/Pages/ProfilePage.tsx b/packages/app/src/Pages/ProfilePage.tsx index 37716b781..45769a911 100644 --- a/packages/app/src/Pages/ProfilePage.tsx +++ b/packages/app/src/Pages/ProfilePage.tsx @@ -256,13 +256,19 @@ export default function ProfilePage() { const link = findTag(status.music, "r"); const cover = findTag(status.music, "cover"); const inner = () => { - return
- {cover && } - 🎵 {unwrap(status.music).content} -
- } + return ( +
+ {cover && } + 🎵 {unwrap(status.music).content} +
+ ); + }; if (link) { - return {inner()}; + return ( + + {inner()} + + ); } return inner(); } @@ -278,9 +284,7 @@ export default function ProfilePage() { {user?.nip05 && } {showBadges && } - {showStatus && <> - {musicStatus()} - } + {showStatus && <>{musicStatus()}}
{links()} @@ -322,14 +326,14 @@ export default function ProfilePage() { targets={ lnurl?.lnurl && id ? [ - { - type: "lnurl", - value: lnurl?.lnurl, - weight: 1, - name: user?.display_name || user?.name, - zap: { pubkey: id }, - } as ZapTarget, - ] + { + type: "lnurl", + value: lnurl?.lnurl, + weight: 1, + name: user?.display_name || user?.name, + zap: { pubkey: id }, + } as ZapTarget, + ] : undefined } show={showLnQr}