return note or profile component directly from NostrLinkHandler

This commit is contained in:
Martti Malmi
2023-10-08 16:21:56 +03:00
parent 5ed096509a
commit 091169ae7d
3 changed files with 26 additions and 15 deletions

View File

@ -205,9 +205,10 @@ const TierThree = ({ active, isLastSubthread, notes, related, chains, onNavigate
);
};
export function ThreadRoute() {
export function ThreadRoute({ id }: { id?: string }) {
const params = useParams();
const link = parseNostrLink(params.id ?? "", NostrPrefix.Note);
const resolvedId = id ?? params.id;
const link = parseNostrLink(resolvedId ?? "", NostrPrefix.Note);
return (
<ThreadContextWrapper link={link}>