Skip to content

Commit 5d947a3

Browse files
Merge pull request #1278 from GetStream/revert-1262-mads/automatic-translations
revert: "feat: add appSettings to ChatContext"
2 parents 82c02e6 + 450ef9d commit 5d947a3

File tree

6 files changed

+1
-85
lines changed

6 files changed

+1
-85
lines changed

package/src/components/ChannelList/hooks/listeners/__tests__/useChannelUpdated.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ describe('useChannelUpdated', () => {
5555
render(
5656
<ChatContext.Provider
5757
value={{
58-
appSettings: null,
5958
client: mockClient,
6059
connectionRecovering: false,
6160
isOnline: true,

package/src/components/Chat/Chat.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Dayjs from 'dayjs';
55

66
import type { Channel } from 'stream-chat';
77

8-
import { useAppSettings } from './hooks/useAppSettings';
98
import { useCreateChatContext } from './hooks/useCreateChatContext';
109
import { useIsOnline } from './hooks/useIsOnline';
1110
import { useMutedUsers } from './hooks/useMutedUsers';
@@ -162,10 +161,7 @@ const ChatWithContext = <
162161

163162
const setActiveChannel = (newChannel?: Channel<StreamChatGenerics>) => setChannel(newChannel);
164163

165-
const appSettings = useAppSettings(client, isOnline);
166-
167164
const chatContext = useCreateChatContext({
168-
appSettings,
169165
channel,
170166
client,
171167
connectionRecovering,

package/src/components/Chat/hooks/__tests__/useAppSettings.test.tsx

Lines changed: 0 additions & 34 deletions
This file was deleted.

package/src/components/Chat/hooks/useAppSettings.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

package/src/components/Chat/hooks/useCreateChatContext.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import type { DefaultStreamChatGenerics } from '../../../types/types';
66
export const useCreateChatContext = <
77
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
88
>({
9-
appSettings,
109
channel,
1110
client,
1211
connectionRecovering,
@@ -22,7 +21,6 @@ export const useCreateChatContext = <
2221

2322
const chatContext: ChatContextValue<StreamChatGenerics> = useMemo(
2423
() => ({
25-
appSettings,
2624
channel,
2725
client,
2826
connectionRecovering,

package/src/contexts/chatContext/ChatContext.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
import React, { PropsWithChildren, useContext } from 'react';
22

3-
import type { AppSettingsAPIResponse, Channel, Mute, StreamChat } from 'stream-chat';
3+
import type { Channel, Mute, StreamChat } from 'stream-chat';
44

55
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
66
import { getDisplayName } from '../utils/getDisplayName';
77

88
export type ChatContextValue<
99
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
1010
> = {
11-
/**
12-
* Object of application settings returned from Stream.
13-
* */
14-
appSettings: AppSettingsAPIResponse<StreamChatGenerics> | null;
1511
/**
1612
* The StreamChat client object
1713
*

0 commit comments

Comments
 (0)