fix bug with blurred images

This commit is contained in:
hzrd149
2023-07-02 10:32:28 -05:00
parent 086279ebdd
commit 871d6994e0
3 changed files with 19 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
---
"nostrudel": patch
---
Fix blured images opening when clicked

View File

@@ -9,7 +9,20 @@ const BlurredImage = (props: ImageProps) => {
const { isOpen, onOpen } = useDisclosure();
return (
<Box overflow="hidden">
<Image onClick={onOpen} cursor="pointer" filter={isOpen ? "" : "blur(1.5rem)"} {...props} />
<Image
onClick={
!isOpen
? (e) => {
e.stopPropagation();
e.preventDefault();
onOpen();
}
: undefined
}
cursor="pointer"
filter={isOpen ? "" : "blur(1.5rem)"}
{...props}
/>
</Box>
);
};

View File

@@ -23,8 +23,6 @@ import { useUserMetadata } from "../hooks/use-user-metadata";
import { UserLink } from "./user-link";
import { parsePaymentRequest, readablizeSats } from "../helpers/bolt11";
import { ExternalLinkIcon, LightningIcon, QrCodeIcon } from "./icons";
import lnurlMetadataService from "../services/lnurl-metadata";
import { useAsync } from "react-use";
import { nip57 } from "nostr-tools";
import clientRelaysService from "../services/client-relays";
import { getEventRelays } from "../services/event-relays";