mirror of
https://git.v0l.io/Kieran/dtan.git
synced 2025-01-18 04:41:32 +00:00
refactor: navigate to event after publish
This commit is contained in:
parent
1935b5a051
commit
31f898bf90
@ -7,6 +7,7 @@ import * as bencode from "../bencode";
|
||||
import { sha1 } from "@noble/hashes/sha1";
|
||||
import { bytesToHex } from "@noble/hashes/utils";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { NostrLink } from "@snort/system";
|
||||
|
||||
async function openFile(): Promise<File | undefined> {
|
||||
return new Promise((resolve) => {
|
||||
@ -103,7 +104,7 @@ export function NewPage() {
|
||||
if (ev) {
|
||||
await login.system.BroadcastEvent(ev);
|
||||
}
|
||||
navigate("/");
|
||||
navigate(`/e/${NostrLink.fromEvent(ev).encode()}`);
|
||||
}
|
||||
|
||||
function renderCategories(a: Category, tags: Array<string>): ReactNode {
|
||||
|
Loading…
Reference in New Issue
Block a user