bug: thread navigation reload
This commit is contained in:
@ -215,13 +215,12 @@ export default function Note(props: NoteProps) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.onClick) {
|
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
if (props.onClick) {
|
||||||
props.onClick(eTarget);
|
props.onClick(eTarget);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
e.stopPropagation();
|
|
||||||
const link = eventLink(eTarget.id, eTarget.relays);
|
const link = eventLink(eTarget.id, eTarget.relays);
|
||||||
// detect cmd key and open in new tab
|
// detect cmd key and open in new tab
|
||||||
if (e.metaKey) {
|
if (e.metaKey) {
|
||||||
|
@ -2,7 +2,7 @@ import "./Thread.css";
|
|||||||
import { useMemo, useState, ReactNode } from "react";
|
import { useMemo, useState, ReactNode } from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
import { useNavigate, useLocation, Link, useParams } from "react-router-dom";
|
import { useNavigate, useLocation, Link, useParams } from "react-router-dom";
|
||||||
import { TaggedRawEvent, u256, EventKind, encodeTLV, NostrPrefix } from "@snort/nostr";
|
import { TaggedRawEvent, u256, EventKind, NostrPrefix } from "@snort/nostr";
|
||||||
import { EventExt, Thread as ThreadInfo } from "System/EventExt";
|
import { EventExt, Thread as ThreadInfo } from "System/EventExt";
|
||||||
|
|
||||||
import { eventLink, unwrap, getReactions, parseNostrLink, getAllReactions, findTag } from "Util";
|
import { eventLink, unwrap, getReactions, parseNostrLink, getAllReactions, findTag } from "Util";
|
||||||
@ -221,10 +221,7 @@ export default function Thread() {
|
|||||||
|
|
||||||
function navigateThread(e: TaggedRawEvent) {
|
function navigateThread(e: TaggedRawEvent) {
|
||||||
setCurrentId(e.id);
|
setCurrentId(e.id);
|
||||||
const link = encodeTLV(e.id, NostrPrefix.Event, e.relays);
|
//const link = encodeTLV(e.id, NostrPrefix.Event, e.relays);
|
||||||
navigate(`/e/${link}`, {
|
|
||||||
replace: true,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const chains = useMemo(() => {
|
const chains = useMemo(() => {
|
||||||
|
Reference in New Issue
Block a user