chore: Update translations
This commit is contained in:
@ -8,7 +8,7 @@ export default function NostrLink({ link, depth }: { link: string; depth?: numbe
|
|||||||
const nav = tryParseNostrLink(link);
|
const nav = tryParseNostrLink(link);
|
||||||
|
|
||||||
if (nav?.type === NostrPrefix.PublicKey || nav?.type === NostrPrefix.Profile) {
|
if (nav?.type === NostrPrefix.PublicKey || nav?.type === NostrPrefix.Profile) {
|
||||||
if(nav.id.startsWith("npub")){
|
if (nav.id.startsWith("npub")) {
|
||||||
// eslint-disable-next-line no-debugger
|
// eslint-disable-next-line no-debugger
|
||||||
debugger;
|
debugger;
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ export function tryParseNostrLink(link: string, prefixHint?: NostrPrefix): Nostr
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function trimNostrLink(link: string) {
|
export function trimNostrLink(link: string) {
|
||||||
let entity = (link.startsWith("web+nostr:") || link.startsWith("nostr:")) ? link.split(":")[1] : link;
|
let entity = link.startsWith("web+nostr:") || link.startsWith("nostr:") ? link.split(":")[1] : link;
|
||||||
|
|
||||||
// trim any non-bech32 chars
|
// trim any non-bech32 chars
|
||||||
entity = entity.match(/(n(?:pub|profile|event|ote|addr|req)1[acdefghjklmnpqrstuvwxyz023456789]+)/)?.[0] ?? entity;
|
entity = entity.match(/(n(?:pub|profile|event|ote|addr|req)1[acdefghjklmnpqrstuvwxyz023456789]+)/)?.[0] ?? entity;
|
||||||
|
Reference in New Issue
Block a user