Skip to content

Commit e9364c5

Browse files
committed
fix: lint issues and failing tests
1 parent 1fe8b60 commit e9364c5

File tree

13 files changed

+78
-93
lines changed

13 files changed

+78
-93
lines changed

package/src/components/Attachment/FileIcon.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import { useTheme } from '../../contexts/themeContext/ThemeContext';
44

55
import { Audio } from '../../icons/filetype-audio-xl';
66
import { Code } from '../../icons/filetype-code-xl';
7-
import { DOC } from '../../icons/filetype-text-xl';
7+
import { ZIP } from '../../icons/filetype-compression-xl';
88
import { OtherFileIcon } from '../../icons/filetype-other-xl';
99
import { PDF } from '../../icons/filetype-pdf-xl';
1010
import { Presentation } from '../../icons/filetype-presentation-xl';
1111
import { SpreadSheet } from '../../icons/filetype-spreadsheet-xl';
12-
import type { IconProps } from '../../icons/utils/base';
12+
import { DOC } from '../../icons/filetype-text-xl';
1313
import { Video } from '../../icons/filetype-video-xl';
14-
import { ZIP } from '../../icons/filetype-compression-xl';
14+
import type { IconProps } from '../../icons/utils/base';
1515

1616
// https://www.iana.org/assignments/media-types/media-types.xhtml#audio
1717
const audioFileTypes = [

package/src/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { CommandVariants } from 'stream-chat';
55

66
import { useTheme } from '../../contexts/themeContext/ThemeContext';
77
import { Flag, GiphyIcon, Mute, Sound, UserAdd, UserDelete } from '../../icons';
8-
import { Imgur } from '../../icons/imgur';
98
import { Lightning } from '../../icons/bolt';
9+
import { Imgur } from '../../icons/imgur';
1010

1111
export const SuggestionCommandIcon = ({ name }: { name: CommandVariants }) => {
1212
const {

package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.js.snap

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -595,14 +595,10 @@ exports[`AttachButton should call handleAttachButtonPress when the button is cli
595595
>
596596
<RNSVGPath
597597
d="M11.875 2.5H4.375C4.20924 2.5 4.05027 2.56585 3.93306 2.68306C3.81585 2.80027 3.75 2.95924 3.75 3.125V16.875C3.75 17.0408 3.81585 17.1997 3.93306 17.3169C4.05027 17.4342 4.20924 17.5 4.375 17.5H15.625C15.7908 17.5 15.9497 17.4342 16.0669 17.3169C16.1842 17.1997 16.25 17.0408 16.25 16.875V6.875M11.875 2.5L16.25 6.875M11.875 2.5V6.875H16.25"
598-
fill={
599-
{
600-
"payload": 4278190080,
601-
"type": 0,
602-
}
603-
}
598+
fill={null}
604599
propList={
605600
[
601+
"fill",
606602
"stroke",
607603
"strokeWidth",
608604
"strokeLinecap",
@@ -617,7 +613,7 @@ exports[`AttachButton should call handleAttachButtonPress when the button is cli
617613
}
618614
strokeLinecap={1}
619615
strokeLinejoin={1}
620-
strokeWidth={1.5}
616+
strokeWidth={1.2}
621617
/>
622618
</RNSVGGroup>
623619
</RNSVGSvgView>
@@ -1494,14 +1490,10 @@ exports[`AttachButton should render a enabled AttachButton 1`] = `
14941490
>
14951491
<RNSVGPath
14961492
d="M11.875 2.5H4.375C4.20924 2.5 4.05027 2.56585 3.93306 2.68306C3.81585 2.80027 3.75 2.95924 3.75 3.125V16.875C3.75 17.0408 3.81585 17.1997 3.93306 17.3169C4.05027 17.4342 4.20924 17.5 4.375 17.5H15.625C15.7908 17.5 15.9497 17.4342 16.0669 17.3169C16.1842 17.1997 16.25 17.0408 16.25 16.875V6.875M11.875 2.5L16.25 6.875M11.875 2.5V6.875H16.25"
1497-
fill={
1498-
{
1499-
"payload": 4278190080,
1500-
"type": 0,
1501-
}
1502-
}
1493+
fill={null}
15031494
propList={
15041495
[
1496+
"fill",
15051497
"stroke",
15061498
"strokeWidth",
15071499
"strokeLinecap",
@@ -1516,7 +1508,7 @@ exports[`AttachButton should render a enabled AttachButton 1`] = `
15161508
}
15171509
strokeLinecap={1}
15181510
strokeLinejoin={1}
1519-
strokeWidth={1.5}
1511+
strokeWidth={1.2}
15201512
/>
15211513
</RNSVGGroup>
15221514
</RNSVGSvgView>
@@ -2393,14 +2385,10 @@ exports[`AttachButton should render an disabled AttachButton 1`] = `
23932385
>
23942386
<RNSVGPath
23952387
d="M11.875 2.5H4.375C4.20924 2.5 4.05027 2.56585 3.93306 2.68306C3.81585 2.80027 3.75 2.95924 3.75 3.125V16.875C3.75 17.0408 3.81585 17.1997 3.93306 17.3169C4.05027 17.4342 4.20924 17.5 4.375 17.5H15.625C15.7908 17.5 15.9497 17.4342 16.0669 17.3169C16.1842 17.1997 16.25 17.0408 16.25 16.875V6.875M11.875 2.5L16.25 6.875M11.875 2.5V6.875H16.25"
2396-
fill={
2397-
{
2398-
"payload": 4278190080,
2399-
"type": 0,
2400-
}
2401-
}
2388+
fill={null}
24022389
propList={
24032390
[
2391+
"fill",
24042392
"stroke",
24052393
"strokeWidth",
24062394
"strokeLinecap",
@@ -2415,7 +2403,7 @@ exports[`AttachButton should render an disabled AttachButton 1`] = `
24152403
}
24162404
strokeLinecap={1}
24172405
strokeLinejoin={1}
2418-
strokeWidth={1.5}
2406+
strokeWidth={1.2}
24192407
/>
24202408
</RNSVGGroup>
24212409
</RNSVGSvgView>

package/src/components/MessageInput/__tests__/__snapshots__/SendButton.test.js.snap

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -585,14 +585,10 @@ exports[`SendButton should render a SendButton 1`] = `
585585
>
586586
<RNSVGPath
587587
d="M11.875 2.5H4.375C4.20924 2.5 4.05027 2.56585 3.93306 2.68306C3.81585 2.80027 3.75 2.95924 3.75 3.125V16.875C3.75 17.0408 3.81585 17.1997 3.93306 17.3169C4.05027 17.4342 4.20924 17.5 4.375 17.5H15.625C15.7908 17.5 15.9497 17.4342 16.0669 17.3169C16.1842 17.1997 16.25 17.0408 16.25 16.875V6.875M11.875 2.5L16.25 6.875M11.875 2.5V6.875H16.25"
588-
fill={
589-
{
590-
"payload": 4278190080,
591-
"type": 0,
592-
}
593-
}
588+
fill={null}
594589
propList={
595590
[
591+
"fill",
596592
"stroke",
597593
"strokeWidth",
598594
"strokeLinecap",
@@ -607,7 +603,7 @@ exports[`SendButton should render a SendButton 1`] = `
607603
}
608604
strokeLinecap={1}
609605
strokeLinejoin={1}
610-
strokeWidth={1.5}
606+
strokeWidth={1.2}
611607
/>
612608
</RNSVGGroup>
613609
</RNSVGSvgView>
@@ -1474,14 +1470,10 @@ exports[`SendButton should render a disabled SendButton 1`] = `
14741470
>
14751471
<RNSVGPath
14761472
d="M11.875 2.5H4.375C4.20924 2.5 4.05027 2.56585 3.93306 2.68306C3.81585 2.80027 3.75 2.95924 3.75 3.125V16.875C3.75 17.0408 3.81585 17.1997 3.93306 17.3169C4.05027 17.4342 4.20924 17.5 4.375 17.5H15.625C15.7908 17.5 15.9497 17.4342 16.0669 17.3169C16.1842 17.1997 16.25 17.0408 16.25 16.875V6.875M11.875 2.5L16.25 6.875M11.875 2.5V6.875H16.25"
1477-
fill={
1478-
{
1479-
"payload": 4278190080,
1480-
"type": 0,
1481-
}
1482-
}
1473+
fill={null}
14831474
propList={
14841475
[
1476+
"fill",
14851477
"stroke",
14861478
"strokeWidth",
14871479
"strokeLinecap",
@@ -1496,7 +1488,7 @@ exports[`SendButton should render a disabled SendButton 1`] = `
14961488
}
14971489
strokeLinecap={1}
14981490
strokeLinejoin={1}
1499-
strokeWidth={1.5}
1491+
strokeWidth={1.2}
15001492
/>
15011493
</RNSVGGroup>
15021494
</RNSVGSvgView>

package/src/components/MessageInput/components/AudioRecorder/AudioRecorder.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import { useTheme } from '../../../../contexts/themeContext/ThemeContext';
1414
import { useTranslationContext } from '../../../../contexts/translationContext/TranslationContext';
1515
import { useStateStore } from '../../../../hooks/useStateStore';
1616

17+
import { Tick } from '../../../../icons/checkmark';
1718
import { ChevronLeft } from '../../../../icons/chevron-left';
1819
import { Delete } from '../../../../icons/delete';
19-
import { Mic } from '../../../../icons/voice';
2020
import { Stop } from '../../../../icons/stop-fill';
21-
import { Tick } from '../../../../icons/checkmark';
2221
import { IconProps } from '../../../../icons/utils/base';
22+
import { Mic } from '../../../../icons/voice';
2323
import { NativeHandlers } from '../../../../native';
2424
import { AudioRecorderManagerState } from '../../../../state-store/audio-recorder-manager';
2525
import { primitives } from '../../../../theme';

package/src/components/Poll/components/CreatePollOptions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import { PollComposerOption, PollComposerState } from 'stream-chat';
1919
import { useCreatePollContentContext, useTheme, useTranslationContext } from '../../../contexts';
2020
import { useMessageComposer } from '../../../contexts/messageInputContext/hooks/useMessageComposer';
2121
import { useStateStore } from '../../../hooks/useStateStore';
22+
import { InfoTooltip } from '../../../icons/info';
2223
import { CircleMinus } from '../../../icons/minus-circle';
2324
import { DotGrid } from '../../../icons/reorder';
24-
import { InfoTooltip } from '../../../icons/info';
2525
import { primitives } from '../../../theme';
2626

2727
export type CurrentOptionPositionsCache = {

package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2769,14 +2769,10 @@ exports[`Thread should match thread snapshot 1`] = `
27692769
>
27702770
<RNSVGPath
27712771
d="M11.875 2.5H4.375C4.20924 2.5 4.05027 2.56585 3.93306 2.68306C3.81585 2.80027 3.75 2.95924 3.75 3.125V16.875C3.75 17.0408 3.81585 17.1997 3.93306 17.3169C4.05027 17.4342 4.20924 17.5 4.375 17.5H15.625C15.7908 17.5 15.9497 17.4342 16.0669 17.3169C16.1842 17.1997 16.25 17.0408 16.25 16.875V6.875M11.875 2.5L16.25 6.875M11.875 2.5V6.875H16.25"
2772-
fill={
2773-
{
2774-
"payload": 4278190080,
2775-
"type": 0,
2776-
}
2777-
}
2772+
fill={null}
27782773
propList={
27792774
[
2775+
"fill",
27802776
"stroke",
27812777
"strokeWidth",
27822778
"strokeLinecap",
@@ -2791,7 +2787,7 @@ exports[`Thread should match thread snapshot 1`] = `
27912787
}
27922788
strokeLinecap={1}
27932789
strokeLinejoin={1}
2794-
strokeWidth={1.5}
2790+
strokeWidth={1.2}
27952791
/>
27962792
</RNSVGGroup>
27972793
</RNSVGSvgView>

package/src/components/ui/GiphyChip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { TextComposerState } from 'stream-chat';
66
import { useMessageComposer } from '../../contexts/messageInputContext/hooks/useMessageComposer';
77
import { useTheme } from '../../contexts/themeContext/ThemeContext';
88
import { useStateStore } from '../../hooks/useStateStore';
9-
import { Cross } from '../../icons/xmark-1';
109
import { Lightning } from '../../icons/bolt';
10+
import { Cross } from '../../icons/xmark-1';
1111
import { primitives } from '../../theme';
1212

1313
const textComposerStateSelector = (state: TextComposerState) => ({

package/src/hooks/messagePreview/useMessagePreviewIcon.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { DraftMessage, LocalMessage, MessageResponse } from 'stream-chat';
22

33
import { useGroupedAttachments } from '../../hooks/messagePreview/useGroupedAttachments';
44

5-
import { CircleBan } from '../../icons/no-sign';
65
import { File } from '../../icons/file';
6+
import { PhotoIcon } from '../../icons/image';
77
import { Link } from '../../icons/link';
88
import { MapPin } from '../../icons/location';
9-
import { Mic } from '../../icons/voice';
10-
import { PhotoIcon } from '../../icons/image';
9+
import { CircleBan } from '../../icons/no-sign';
1110
import { PollIcon } from '../../icons/poll';
1211
import { VideoIcon } from '../../icons/video';
12+
import { Mic } from '../../icons/voice';
1313
import { FileTypes } from '../../types/types';
1414

1515
export const useMessagePreviewIcon = ({

package/src/icons/Checkmark.tsx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@ import Svg, { Path } from 'react-native-svg';
44

55
import { IconProps } from './utils/base';
66

7-
export const Check = ({ height, size, width, ...rest }: IconProps) => (
8-
<Svg viewBox={'0 0 20 20'} fill='none' height={height ?? size} width={width ?? size} {...rest}>
9-
<Path
10-
d='M3.125 11.25L7.5 15.625L17.5 5.625'
11-
strokeWidth={1.5}
12-
strokeLinecap='round'
13-
strokeLinejoin='round'
14-
{...rest}
15-
/>
16-
</Svg>
17-
);
7+
export const Check = ({ fill, height, pathFill, size, stroke, width, ...rest }: IconProps) => {
8+
const color = stroke ?? pathFill ?? fill ?? 'black';
9+
10+
return (
11+
<Svg viewBox={'0 0 20 20'} fill='none' height={height ?? size} width={width ?? size} {...rest}>
12+
<Path
13+
d='M3.125 11.25L7.5 15.625L17.5 5.625'
14+
fill='none'
15+
stroke={color}
16+
strokeWidth={1.5}
17+
strokeLinecap='round'
18+
strokeLinejoin='round'
19+
/>
20+
</Svg>
21+
);
22+
};
1823

1924
export const Tick = (props: IconProps) => <Check {...props} />;

0 commit comments

Comments
 (0)