mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-04-13 06:09:42 +02:00
more patches
This commit is contained in:
parent
e7ce8913c7
commit
bb10dfb62b
@ -47,23 +47,27 @@ const ReactionEvent = React.memo(({ event }: { event: NostrEvent }) => (
|
||||
));
|
||||
|
||||
const ZapEvent = React.memo(({ event }: { event: NostrEvent }) => {
|
||||
const { payment, request } = parseZapNote(event);
|
||||
try {
|
||||
const { payment, request } = parseZapNote(event);
|
||||
|
||||
if (!payment.amount) return null;
|
||||
if (!payment.amount) return null;
|
||||
|
||||
return (
|
||||
<Flex gap="2">
|
||||
<Text>{readableAmountInSats(payment.amount)}</Text>
|
||||
<Flex overflow="hidden" gap="2">
|
||||
<UserAvatarLink pubkey={request.pubkey} size="xs" />
|
||||
<UserLink pubkey={request.pubkey} />
|
||||
return (
|
||||
<Flex gap="2">
|
||||
<Text>{readableAmountInSats(payment.amount)}</Text>
|
||||
<Flex overflow="hidden" gap="2">
|
||||
<UserAvatarLink pubkey={request.pubkey} size="xs" />
|
||||
<UserLink pubkey={request.pubkey} />
|
||||
</Flex>
|
||||
<Text>{request.content}</Text>
|
||||
<Text ml="auto" flexShrink={0}>
|
||||
{moment(convertTimestampToDate(event.created_at)).fromNow()}
|
||||
</Text>
|
||||
</Flex>
|
||||
<Text>{request.content}</Text>
|
||||
<Text ml="auto" flexShrink={0}>
|
||||
{moment(convertTimestampToDate(event.created_at)).fromNow()}
|
||||
</Text>
|
||||
</Flex>
|
||||
);
|
||||
);
|
||||
} catch (e) {
|
||||
return <Text>Invalid Zap</Text>;
|
||||
}
|
||||
});
|
||||
|
||||
function sortEvents(a: NostrEvent, b: NostrEvent) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user