Skip to content

Commit 0184657

Browse files
ESLint+Prettier fixes
1 parent 76152dc commit 0184657

File tree

174 files changed

+490
-482
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+490
-482
lines changed

src/components/AIStateIndicator/AIStateIndicator.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react';
2-
3-
import { Channel } from 'stream-chat';
2+
import type { Channel } from 'stream-chat';
43

54
import { AIStates, useAIState } from './hooks/useAIState';
65

src/components/AIStateIndicator/hooks/useAIState.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useEffect, useState } from 'react';
2-
3-
import { AIState, Channel, Event } from 'stream-chat';
2+
import type { AIState, Channel, Event } from 'stream-chat';
43

54
export const AIStates = {
65
Error: 'AI_STATE_ERROR',

src/components/Attachment/Attachment.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ import type { ReactPlayerProps } from 'react-player';
33
import type { Attachment as StreamAttachment } from 'stream-chat';
44

55
import {
6-
GroupedRenderedAttachment,
76
isAudioAttachment,
87
isFileAttachment,
98
isMediaAttachment,
109
isScrapedContent,
1110
isUploadedImage,
1211
isVoiceRecordingAttachment,
1312
} from './utils';
14-
1513
import {
1614
AudioContainer,
1715
CardContainer,
@@ -22,7 +20,6 @@ import {
2220
UnsupportedAttachmentContainer,
2321
VoiceRecordingContainer,
2422
} from './AttachmentContainer';
25-
2623
import type { AttachmentActionsProps } from './AttachmentActions';
2724
import type { AudioProps } from './Audio';
2825
import type { VoiceRecordingProps } from './VoiceRecording';
@@ -31,6 +28,7 @@ import type { FileAttachmentProps } from './FileAttachment';
3128
import type { GalleryProps, ImageProps } from '../Gallery';
3229
import type { UnsupportedAttachmentProps } from './UnsupportedAttachment';
3330
import type { ActionHandlerReturnType } from '../Message/hooks/useActionHandler';
31+
import type { GroupedRenderedAttachment } from './utils';
3432

3533
const CONTAINER_MAP = {
3634
audio: AudioContainer,

src/components/Attachment/AttachmentContainer.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import React, { PropsWithChildren, useLayoutEffect, useRef, useState } from 'react';
1+
import type { PropsWithChildren } from 'react';
2+
import React, { useLayoutEffect, useRef, useState } from 'react';
23
import ReactPlayer from 'react-player';
34
import clsx from 'clsx';
4-
55
import * as linkify from 'linkifyjs';
6+
import type { Attachment } from 'stream-chat';
67

78
import { AttachmentActions as DefaultAttachmentActions } from './AttachmentActions';
89
import { Audio as DefaultAudio } from './Audio';
@@ -11,23 +12,19 @@ import { Gallery as DefaultGallery, ImageComponent as DefaultImage } from '../Ga
1112
import { Card as DefaultCard } from './Card';
1213
import { FileAttachment as DefaultFile } from './FileAttachment';
1314
import { UnsupportedAttachment as DefaultUnsupportedAttachment } from './UnsupportedAttachment';
14-
import {
15+
import type {
1516
AttachmentComponentType,
1617
GalleryAttachment,
17-
isGalleryAttachmentType,
18-
isSvgAttachment,
1918
RenderAttachmentProps,
2019
RenderGalleryProps,
2120
} from './utils';
22-
21+
import { isGalleryAttachmentType, isSvgAttachment } from './utils';
2322
import { useChannelStateContext } from '../../context/ChannelStateContext';
24-
23+
import type { LocalAttachment } from '../MessageInput';
2524
import type {
2625
ImageAttachmentConfiguration,
2726
VideoAttachmentConfiguration,
2827
} from '../../types/types';
29-
import type { Attachment } from 'stream-chat';
30-
import { LocalAttachment } from '../MessageInput';
3128

3229
export type AttachmentContainerProps = {
3330
attachment: Attachment | GalleryAttachment;

src/components/Attachment/Audio.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
32
import type { Attachment } from 'stream-chat';
43

54
import { DownloadButton, FileSizeIndicator, PlayButton, ProgressBar } from './components';

src/components/Attachment/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import clsx from 'clsx';
33
import ReactPlayer from 'react-player';
44

5-
import { AudioProps } from './Audio';
5+
import type { AudioProps } from './Audio';
66
import { ImageComponent } from '../Gallery';
77
import { SafeAnchor } from '../SafeAnchor';
88
import { PlayButton, ProgressBar } from './components';

src/components/Attachment/UnsupportedAttachment.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React from 'react';
2+
import type { Attachment } from 'stream-chat';
3+
24
import { FileIcon } from '../ReactFileUtilities';
35
import { useTranslationContext } from '../../context';
4-
import type { Attachment } from 'stream-chat';
56

67
export type UnsupportedAttachmentProps = {
78
attachment: Attachment;

src/components/Attachment/components/WaveProgressBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import throttle from 'lodash.throttle';
2+
import type { PointerEventHandler } from 'react';
23
import React, {
3-
PointerEventHandler,
44
useCallback,
55
useEffect,
66
useLayoutEffect,

src/components/Attachment/utils.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { ReactNode } from 'react';
2-
1+
import type { ReactNode } from 'react';
32
import type { Attachment } from 'stream-chat';
3+
44
import type { ATTACHMENT_GROUPS_ORDER, AttachmentProps } from './Attachment';
55
import type {
66
LocalAttachment,

src/components/Avatar/Avatar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import clsx from 'clsx';
22
import React, { useEffect, useState } from 'react';
3-
43
import type { UserResponse } from 'stream-chat';
54

65
import { Icon } from '../Threads/icons';

0 commit comments

Comments
 (0)