forked from abner/for-legacy-web
Remove useChannel
This commit is contained in:
@@ -77,13 +77,6 @@ function useObject(
|
||||
: map.toArray();
|
||||
}
|
||||
|
||||
export function useChannel(id?: string, context?: HookContext) {
|
||||
if (typeof id === "undefined") return;
|
||||
return useObject("channels", id, context) as
|
||||
| Readonly<Channels.Channel>
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export function useChannels(ids?: string[], context?: HookContext) {
|
||||
return useObject("channels", ids, context) as (
|
||||
| Readonly<Channels.Channel>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Client } from "revolt.js";
|
||||
import { Channel, Message, User } from "revolt.js/dist/api/objects";
|
||||
import { Message } from "revolt.js/dist/api/objects";
|
||||
|
||||
import { Text } from "preact-i18n";
|
||||
|
||||
import { Channel } from "../../mobx";
|
||||
|
||||
import { Children } from "../../types/Preact";
|
||||
|
||||
export function takeError(error: any): string {
|
||||
|
||||
Reference in New Issue
Block a user