temporary fix redirect issue in nextjs export

This commit is contained in:
Ren Amamiya
2023-04-21 17:37:47 +07:00
parent b64ed8b587
commit 8bf386ca9b
12 changed files with 41 additions and 32 deletions

View File

@@ -22,13 +22,13 @@ export const NoteBase = memo(function NoteBase({ event }: { event: any }) {
const openUserPage = (e) => {
e.stopPropagation();
router.push(`/nostr/user?pubkey=${event.pubkey}`);
router.push(`/nostr/user?pubkey=${event.pubkey}`, { forceOptimisticNavigation: true });
};
const openThread = (e) => {
const selection = window.getSelection();
if (selection.toString().length === 0) {
router.push(`/nostr/newsfeed/note?id=${event.parent_id}`);
router.push(`/nostr/newsfeed/note?id=${event.parent_id}`, { forceOptimisticNavigation: true });
} else {
e.stopPropagation();
}