Remove remaining references to useUser(s).

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

No files matched your search

@@ -31,7 +31,6 @@ import {
useChannels,
useForceUpdate,
useUserPermission,
useUsers,
} from "../../revoltjs/hooks";
import { useIntermediate } from "../Intermediate";
-12
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