UNPKG

@river-build/react-sdk

Version:
33 lines 1.23 kB
import type { Channel } from '@river-build/sdk'; import { type ObservableConfig } from './useObservable'; /** * Hook to get data about a channel. * You can use this hook to get channel metadata and if the user has joined the channel. * @param spaceId - The id of the space the channel belongs to. * @param channelId - The id of the channel to get data about. * @param config - Configuration options for the observable. * @returns The ChannelModel data. */ export declare const useChannel: (spaceId: string, channelId: string, config?: ObservableConfig.FromObservable<Channel>) => { data: import("@river-build/sdk").ChannelModel; error: Error | undefined; status: "error" | "loading" | "loaded"; isLoading: boolean; isError: boolean; isLoaded: boolean; } | { data: import("@river-build/sdk").ChannelModel; error: Error | undefined; status: "error" | "loading" | "loaded"; isLoading: boolean; isError: boolean; isLoaded: boolean; } | { data: import("@river-build/sdk").ChannelModel; error: Error | undefined; status: "error" | "loading" | "loaded"; isLoading: boolean; isError: boolean; isLoaded: boolean; }; //# sourceMappingURL=useChannel.d.ts.map