From 9f79c622f7974ad671524a4b741ea202c718038d Mon Sep 17 00:00:00 2001 From: hzrd149 Date: Mon, 29 Jan 2024 10:00:49 +0000 Subject: [PATCH] small changes to link display --- src/components/embed-types/common.tsx | 4 +- src/components/event-zap-modal/pay-step.tsx | 47 +++++++++++---------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/components/embed-types/common.tsx b/src/components/embed-types/common.tsx index fc2c4380c..8f43305d5 100644 --- a/src/components/embed-types/common.tsx +++ b/src/components/embed-types/common.tsx @@ -10,8 +10,8 @@ export function renderGenericUrl(match: URL) { "//" + match.host + match.pathname + - (match.search && match.search.length < 20 ? "?" + match.search : "") + - (match.hash.length < 20 ? match.hash : "")} + (match.search && match.search.length < 120 ? match.search : "") + + (match.hash.length < 96 ? match.hash : "")} ); } diff --git a/src/components/event-zap-modal/pay-step.tsx b/src/components/event-zap-modal/pay-step.tsx index f78e81bcd..5b694f0f8 100644 --- a/src/components/event-zap-modal/pay-step.tsx +++ b/src/components/event-zap-modal/pay-step.tsx @@ -21,7 +21,7 @@ function UserCard({ children, pubkey }: PropsWithChildren & { pubkey: string }) } function PayRequestCard({ pubkey, invoice, onPaid }: { pubkey: string; invoice: string; onPaid: () => void }) { const toast = useToast(); - const showMore = useDisclosure(); + const showMore = useDisclosure({ defaultIsOpen: !window.webln }); const payWithWebLn = async () => { try { @@ -39,16 +39,18 @@ function PayRequestCard({ pubkey, invoice, onPaid }: { pubkey: string; invoice: - + {!!window.webln && ( + + )} : } aria-label="More Options" @@ -132,17 +134,18 @@ export default function PayStep({ callbacks, onComplete }: { callbacks: PayReque ); return null; })} - + {!!window.webln && ( + + )} ); }