diff --git a/src/components/Channel/Channel.tsx b/src/components/Channel/Channel.tsx index 3f25746a43..e11f46016c 100644 --- a/src/components/Channel/Channel.tsx +++ b/src/components/Channel/Channel.tsx @@ -41,8 +41,10 @@ import type { OnMentionAction } from './hooks/useMentionsHandlers'; import { useMentionsHandlers } from './hooks/useMentionsHandlers'; import type { LoadingErrorIndicatorProps } from '../Loading'; -import { LoadingErrorIndicator as DefaultLoadingErrorIndicator } from '../Loading'; -import { LoadingChannel as DefaultLoadingIndicator } from './LoadingChannel'; +import { + LoadingErrorIndicator as DefaultLoadingErrorIndicator, + LoadingChannel as DefaultLoadingIndicator, +} from '../Loading'; import type { ChannelActionContextValue, diff --git a/src/components/Channel/__tests__/Channel.test.js b/src/components/Channel/__tests__/Channel.test.js index 74fbf5ed28..2d9139bc48 100644 --- a/src/components/Channel/__tests__/Channel.test.js +++ b/src/components/Channel/__tests__/Channel.test.js @@ -35,6 +35,7 @@ import { DEFAULT_THREAD_PAGE_SIZE } from '../../../constants/limits'; import { generateMessageDraft } from '../../../mock-builders/generator/messageDraft'; jest.mock('../../Loading', () => ({ + LoadingChannel: jest.fn(() =>
Loading channel
), LoadingErrorIndicator: jest.fn(() =>
), LoadingIndicator: jest.fn(() =>
loading
), })); diff --git a/src/components/Channel/__tests__/__snapshots__/Channel.test.js.snap b/src/components/Channel/__tests__/__snapshots__/Channel.test.js.snap index e8de2adff1..6818c4fe8b 100644 --- a/src/components/Channel/__tests__/__snapshots__/Channel.test.js.snap +++ b/src/components/Channel/__tests__/__snapshots__/Channel.test.js.snap @@ -6,112 +6,8 @@ exports[`Channel should render a LoadingIndicator if it is loading 1`] = ` class="str-chat messaging light str-chat__channel" id="str-chat__channel" > -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Loading channel
@@ -123,112 +19,8 @@ exports[`Channel should render default loading indicator if channels query is in class="str-chat str-chat__channel" id="str-chat__channel" > -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Loading channel
diff --git a/src/components/Channel/LoadingChannel.tsx b/src/components/Loading/LoadingChannel.tsx similarity index 100% rename from src/components/Channel/LoadingChannel.tsx rename to src/components/Loading/LoadingChannel.tsx diff --git a/src/components/Loading/index.ts b/src/components/Loading/index.ts index 05ceb99b69..75b5c332f4 100644 --- a/src/components/Loading/index.ts +++ b/src/components/Loading/index.ts @@ -1,3 +1,4 @@ +export * from './LoadingChannel'; export * from './LoadingChannels'; export * from './LoadingErrorIndicator'; export * from './LoadingIndicator';