Improve relay tracking with thunks, add/rename some kinds

This commit is contained in:
Jon Staab
2025-10-24 06:41:56 -07:00
parent c026084635
commit a03a289e93
6 changed files with 29 additions and 20 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ export type MakeUserDataOptions<T> = {
loadItem: UserDataLoader
}
const makeUserData = <T>({mapStore, loadItem}: MakeUserDataOptions<T>) =>
export const makeUserData = <T>({mapStore, loadItem}: MakeUserDataOptions<T>) =>
withGetter(
derived([mapStore, pubkey], ([$mapStore, $pubkey]) => {
if (!$pubkey) return undefined
@@ -28,7 +28,7 @@ const makeUserData = <T>({mapStore, loadItem}: MakeUserDataOptions<T>) =>
}),
)
const makeUserLoader =
export const makeUserLoader =
(loadItem: UserDataLoader) =>
async (relays: string[] = [], force = false) => {
const $pubkey = pubkey.get()