fix: directly get user without useLiveQuery

This commit is contained in:
Alejandro Gomez 2023-01-23 16:09:02 +01:00
parent 3dce87ce3a
commit 7a937bc4c9
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817

View File

@ -18,11 +18,8 @@ export function useQuery(query: string, limit: number = 5) {
}
export function useKey(pubKey: HexKey) {
const defaultUser = useLiveQuery(
() => inMemoryDb.find(pubKey),
[pubKey]
)
// @ts-ignore
const defaultUser = inMemoryDb.users[pubKey]
const user = useLiveQuery(async () => {
if (pubKey) {
try {