refactor: post editor

This commit is contained in:
codytseng 2025-05-23 22:47:31 +08:00
parent 3d06421acb
commit 78725d1e88
31 changed files with 1603 additions and 766 deletions

View file

@ -8,7 +8,7 @@ import {
getRelayListFromRelayListEvent,
getReplaceableEventIdentifier
} from '@/lib/event'
import { formatPubkey, isValidPubkey } from '@/lib/pubkey'
import { formatPubkey, isValidPubkey, pubkeyToNpub } from '@/lib/pubkey'
import client from '@/services/client.service'
import indexedDb from '@/services/indexed-db.service'
import storage from '@/services/local-storage.service'
@ -238,6 +238,7 @@ export function NostrProvider({ children }: { children: React.ReactNode }) {
} else if (!storedProfileEvent) {
setProfile({
pubkey: account.pubkey,
npub: pubkeyToNpub(account.pubkey) ?? '',
username: formatPubkey(account.pubkey)
})
}