feat(note): open note in new tab on cmd press

This commit is contained in:
Lukas Jakob 2023-03-04 12:09:11 -06:00
parent d3fe3a897c
commit 28599938d7
1 changed files with 6 additions and 1 deletions

View File

@ -175,7 +175,12 @@ export default function Note(props: NoteProps) {
function goToEvent(e: React.MouseEvent, id: u256) {
e.stopPropagation();
navigate(eventLink(id));
// detect cmd key and open in new tab
if (e.metaKey) {
window.open(eventLink(id), "_blank");
} else {
navigate(eventLink(id));
}
}
function replyTag() {