NostrSigninModal: hold accountId instead of username in the state

This commit is contained in:
Alex Gleason
2024-02-18 13:00:37 -06:00
parent 872be9ead1
commit 9ddcb1634e
4 changed files with 13 additions and 12 deletions

View File

@ -22,7 +22,7 @@ function useAccountLookup(acct: string | undefined, opts: UseAccountLookupOpts =
const { entity: account, isUnauthorized, ...result } = useEntityLookup<Account>(
Entities.ACCOUNTS,
(account) => account.acct.toLowerCase() === acct?.toLowerCase() || account.nostr.npub === acct,
(account) => account.acct.toLowerCase() === acct?.toLowerCase(),
() => api.get(`/api/v1/accounts/lookup?acct=${acct}`),
{ schema: accountSchema, enabled: !!acct },
);