Skip to content

Commit

Permalink
Add deprecation warnings to the unused hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Dec 19, 2024
1 parent 56def19 commit 6e22447
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/ChannelList/hooks/useChannelDeletedListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import type { Channel, Event } from 'stream-chat';

import type { DefaultStreamChatGenerics } from '../../../types/types';

/**
* @deprecated Use `useChannelListShape` instead.
*/
export const useChannelDeletedListener = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
>(
Expand Down
3 changes: 3 additions & 0 deletions src/components/ChannelList/hooks/useChannelHiddenListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import type { Channel, Event } from 'stream-chat';

import type { DefaultStreamChatGenerics } from '../../../types/types';

/**
* @deprecated Use `useChannelListShape` instead.
*/
export const useChannelHiddenListener = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
>(
Expand Down
3 changes: 3 additions & 0 deletions src/components/ChannelList/hooks/useChannelMembershipState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import type { Channel, ChannelState, ExtendableGenerics } from 'stream-chat';

import { useChatContext } from '../../../context';

/**
* @deprecated Use `useChannelListShape` instead.
*/
export const useChannelMembershipState = <SCG extends ExtendableGenerics>(
channel?: Channel<SCG>,
) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import type { Channel, Event } from 'stream-chat';

import type { DefaultStreamChatGenerics } from '../../../types/types';

/**
* @deprecated Use `useChannelListShape` instead.
*/
export const useChannelTruncatedListener = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
>(
Expand Down
3 changes: 3 additions & 0 deletions src/components/ChannelList/hooks/useChannelUpdatedListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import type { Channel, Event } from 'stream-chat';

import type { DefaultStreamChatGenerics } from '../../../types/types';

/**
* @deprecated Use `useChannelListShape` instead.
*/
export const useChannelUpdatedListener = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
>(
Expand Down
3 changes: 3 additions & 0 deletions src/components/ChannelList/hooks/useChannelVisibleListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import type { Channel, Event } from 'stream-chat';

import type { DefaultStreamChatGenerics } from '../../../types/types';

/**
* @deprecated Use `useChannelListShape` instead.
*/
export const useChannelVisibleListener = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
>(
Expand Down
3 changes: 3 additions & 0 deletions src/components/ChannelList/hooks/useMessageNewListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import type { Channel, Event } from 'stream-chat';

import type { DefaultStreamChatGenerics } from '../../../types/types';

/**
* @deprecated Use `useChannelListShape` instead.
*/
export const useMessageNewListener = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import type { Channel, Event } from 'stream-chat';

import type { DefaultStreamChatGenerics } from '../../../types/types';

/**
* @deprecated Use `useChannelListShape` instead.
*/
export const useNotificationAddedToChannelListener = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import type { Channel, Event } from 'stream-chat';

import type { DefaultStreamChatGenerics } from '../../../types/types';

/**
* @deprecated Use `useChannelListShape` instead.
*/
export const useNotificationMessageNewListener = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import type { Channel, Event } from 'stream-chat';

import type { DefaultStreamChatGenerics } from '../../../types/types';

/**
* @deprecated Use `useChannelListShape` instead.
*/
export const useNotificationRemovedFromChannelListener = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
>(
Expand Down

0 comments on commit 6e22447

Please sign in to comment.