Skip to content

Commit e41052e

Browse files
author
jaapbakker88
authored
Merge pull request #552 from GetStream/ts-fixes-550-542
TS fixes 550, 541, 542
2 parents 5139f9e + f385a51 commit e41052e

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/components/Attachment/Attachment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export const renderAttachmentActions = (props) => {
127127
export const renderGallery = (props) => {
128128
const { attachment: a, Gallery } = props;
129129
return renderAttachmentWithinContainer(
130-
<Gallery images={a.images} key="gallery" />,
130+
<Gallery images={a.images || []} key="gallery" />,
131131
a,
132132
'gallery',
133133
);

src/components/ChannelList/hooks/usePaginatedChannels.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useEffect, useState } from 'react';
44
import { MAX_QUERY_CHANNELS_LIMIT } from '../utils';
55
/**
66
* @typedef {import('stream-chat').Channel} Channel
7-
* @param {import('stream-chat').StreamChat} client
7+
* @param {import('types').StreamChatReactClient} client
88
* @param {import('stream-chat').ChannelFilters} filters
99
* @param {import('stream-chat').ChannelSort} [sort]
1010
* @param {import('stream-chat').ChannelOptions} [options]

src/components/ChannelList/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const moveChannelUp = (cid, channels) => {
2222
};
2323

2424
/**
25-
* @param {import('stream-chat').StreamChat} client
25+
* @param {import('types').StreamChatReactClient} client
2626
* @param {string} type
2727
* @param {string} id
2828
*/

types/index.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,10 @@ export interface ExtendedAttachment extends Client.Attachment {
691691
id?: string;
692692
asset_url?: string;
693693
mime_type?: string;
694-
images?: Array;
694+
images?: Array<{
695+
image_url?: string;
696+
thumb_url?: string;
697+
}>;
695698
}
696699

697700
export interface BaseAttachmentUIComponentProps {

0 commit comments

Comments
 (0)