Remove remaining references to useUser(s).

Add Channel object.
This commit is contained in:
Paul
2021-07-29 16:55:07 +01:00
parent 748713be53
commit 0571c065bd
13 changed files with 126 additions and 54 deletions

View File

@@ -77,18 +77,6 @@ function useObject(
: map.toArray();
}
export function useUser(id?: string, context?: HookContext) {
if (typeof id === "undefined") return;
return useObject("users", id, context) as Readonly<Users.User> | undefined;
}
export function useUsers(ids?: string[], context?: HookContext) {
return useObject("users", ids, context) as (
| Readonly<Users.User>
| undefined
)[];
}
export function useChannel(id?: string, context?: HookContext) {
if (typeof id === "undefined") return;
return useObject("channels", id, context) as