From 13926d57dac50234be5811cb49fc1e967f487a10 Mon Sep 17 00:00:00 2001 From: keyan Date: Tue, 26 Sep 2023 20:59:15 -0500 Subject: [PATCH] handle zaps in satistics --- pages/satistics.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pages/satistics.js b/pages/satistics.js index 51b7f9c3..2f65423c 100644 --- a/pages/satistics.js +++ b/pages/satistics.js @@ -108,10 +108,15 @@ function Detail ({ fact }) { } if (!fact.item) { + let zap + try { + zap = JSON.parse(fact.zapMessage) + } catch { } return (
- {fact.description && {fact.description}} + {(zap && nostr zap) || + (fact.description && {fact.description})} {fact.invoiceComment && sender says: {fact.invoiceComment}} {!fact.invoiceComment && !fact.description && no description}