mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-04-05 02:20:26 +02:00
parent
02ea06ae59
commit
4ce9897395
5
.changeset/honest-hornets-smoke.md
Normal file
5
.changeset/honest-hornets-smoke.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"nostrudel": patch
|
||||
---
|
||||
|
||||
Fix broken links in side drawer
|
5
.changeset/soft-fishes-heal.md
Normal file
5
.changeset/soft-fishes-heal.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"nostrudel": patch
|
||||
---
|
||||
|
||||
Fix bug when clicking on shared long form note
|
@ -1,6 +1,6 @@
|
||||
import { useRef } from "react";
|
||||
import { Flex, Heading, SkeletonText, Text } from "@chakra-ui/react";
|
||||
import { validateEvent } from "nostr-tools";
|
||||
import { Kind, validateEvent } from "nostr-tools";
|
||||
|
||||
import { isETag, NostrEvent } from "../../../types/nostr-event";
|
||||
import { Note } from "../../note";
|
||||
@ -13,6 +13,7 @@ import { safeJson } from "../../../helpers/parse";
|
||||
import { useReadRelayUrls } from "../../../hooks/use-client-relays";
|
||||
import { useRegisterIntersectionEntity } from "../../../providers/intersection-observer";
|
||||
import useSingleEvent from "../../../hooks/use-single-event";
|
||||
import { EmbedEvent } from "../../embed-event";
|
||||
|
||||
function parseHardcodedNoteContent(event: NostrEvent) {
|
||||
const json = safeJson(event.content, null);
|
||||
@ -53,7 +54,13 @@ export default function RepostNote({ event }: { event: NostrEvent }) {
|
||||
</Text>
|
||||
<NoteMenu event={event} size="sm" variant="link" aria-label="note options" />
|
||||
</Flex>
|
||||
{!note ? <SkeletonText /> : <Note event={note} showReplyButton />}
|
||||
{!note ? (
|
||||
<SkeletonText />
|
||||
) : note.kind === Kind.Text ? (
|
||||
<Note event={note} showReplyButton />
|
||||
) : (
|
||||
<EmbedEvent event={note} />
|
||||
)}
|
||||
</Flex>
|
||||
</TrustProvider>
|
||||
);
|
||||
|
@ -104,6 +104,10 @@ export default function DrawerSubViewProvider({
|
||||
openInParent(e.location);
|
||||
}
|
||||
});
|
||||
|
||||
// use the parent routers createHref method so that users can open links in new tabs
|
||||
newRouter.createHref = parentRouter.createHref;
|
||||
|
||||
setRouter(newRouter);
|
||||
},
|
||||
[setRouter, openInParent],
|
||||
|
Loading…
x
Reference in New Issue
Block a user