Skip to content

Commit 44c6a6d

Browse files
committed
fix: remove parent_id prop
1 parent 8636dd7 commit 44c6a6d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

examples/SampleApp/src/components/DraftsList.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export type DraftItemProps = {
2222
message: DraftMessage;
2323
// TODO: Fix the type for thread
2424
thread?: MessageResponseBase;
25-
parentId?: string;
2625
};
2726

2827
export const attachmentTypeIconMap = {
@@ -86,7 +85,7 @@ const getPreviewFromMessage = ({
8685
}
8786
};
8887

89-
export const DraftItem = ({ type, channel, date, message, parentId, thread }: DraftItemProps) => {
88+
export const DraftItem = ({ type, channel, date, message, thread }: DraftItemProps) => {
9089
const {
9190
theme: {
9291
colors: { grey },
@@ -102,9 +101,9 @@ export const DraftItem = ({ type, channel, date, message, parentId, thread }: Dr
102101
const resultChannel = client.channel(channel?.type, channel?.id);
103102
await resultChannel?.watch();
104103

105-
if (type === 'thread' && parentId) {
104+
if (type === 'thread' && thread?.id) {
106105
navigation.navigate('ThreadScreen', {
107-
thread: thread,
106+
thread,
108107
channel: resultChannel,
109108
});
110109
} else if (type === 'channel') {
@@ -152,7 +151,6 @@ const renderItem = ({ item }: { item: DraftResponse }) => (
152151
date={item.created_at}
153152
message={item.message}
154153
thread={item.parent_message}
155-
parentId={item.parent_id}
156154
/>
157155
);
158156

0 commit comments

Comments
 (0)