File tree Expand file tree Collapse file tree 3 files changed +64
-1
lines changed
packages/ui/src/components Expand file tree Collapse file tree 3 files changed +64
-1
lines changed Original file line number Diff line number Diff line change @@ -182,3 +182,61 @@ export const PrivateSolution: Story = {
182
182
] ,
183
183
} ,
184
184
} ;
185
+
186
+ export const ManyFromSameAuthor : Story = {
187
+ args : {
188
+ ...defaultMessage ,
189
+ messages : [
190
+ mockMessageWithDiscordAccount ( {
191
+ id : '1' ,
192
+ solutionIds : [ '4' ] ,
193
+ public : true ,
194
+ author : {
195
+ id : '1' ,
196
+ name : 'John Doe' ,
197
+ avatar : 'https://cdn.discordapp.com/embed/avatars/0.png' ,
198
+ } ,
199
+ } ) ,
200
+ mockMessageWithDiscordAccount ( {
201
+ id : '2' ,
202
+ public : true ,
203
+ author : {
204
+ id : '1' ,
205
+ name : 'John Doe' ,
206
+ avatar : 'https://cdn.discordapp.com/embed/avatars/0.png' ,
207
+ } ,
208
+ } ) ,
209
+ mockMessageWithDiscordAccount ( {
210
+ id : '3' ,
211
+ public : true ,
212
+ } ) ,
213
+ mockMessageWithDiscordAccount ( {
214
+ id : '4' ,
215
+ public : false ,
216
+ author : {
217
+ id : '1' ,
218
+ name : 'John Doe' ,
219
+ avatar : 'https://cdn.discordapp.com/embed/avatars/0.png' ,
220
+ } ,
221
+ } ) ,
222
+ mockMessageWithDiscordAccount ( {
223
+ id : '5' ,
224
+ public : true ,
225
+ author : {
226
+ id : '1' ,
227
+ name : 'John Doe' ,
228
+ avatar : 'https://cdn.discordapp.com/embed/avatars/0.png' ,
229
+ } ,
230
+ } ) ,
231
+ mockMessageWithDiscordAccount ( {
232
+ id : '6' ,
233
+ public : true ,
234
+ author : {
235
+ id : '1' ,
236
+ name : 'John Doe' ,
237
+ avatar : 'https://cdn.discordapp.com/embed/avatars/0.png' ,
238
+ } ,
239
+ } ) ,
240
+ ] ,
241
+ } ,
242
+ } ;
Original file line number Diff line number Diff line change @@ -86,6 +86,11 @@ export function MessageResultPage({
86
86
)
87
87
return null ;
88
88
89
+ if ( message . author . id === nextMessage ?. author . id ) {
90
+ nextMessage . content += `\n${ message . content } ` ;
91
+ return ;
92
+ }
93
+
89
94
const Msg = ( { count } : { count : number } ) => (
90
95
< Message
91
96
key = { message . id }
Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ export const Message = ({
253
253
< Blurrer >
254
254
< div
255
255
className = { cn (
256
- `discord-message grow bg-[#E9ECF2] dark:bg-[#181B1F] ${
256
+ `discord-message grow bg-[#E9ECF2] leading-6 dark:bg-[#181B1F] ${
257
257
showBorders ? 'border-2' : ''
258
258
} border-black/[.13] dark:border-white/[.13] ${
259
259
fullRounded ? 'rounded-standard' : 'lg:rounded-tl-standard'
You can’t perform that action at this time.
0 commit comments