@@ -38,20 +38,20 @@ export const getLatestMessagePreview = (
3838 const poll = latestMessage ?. poll ;
3939
4040 if ( ! latestMessage ) {
41- return t < string > ( 'Nothing yet...' ) ;
41+ return t ( 'Nothing yet...' ) ;
4242 }
4343
4444 if ( latestMessage . deleted_at ) {
45- return t < string > ( 'Message deleted' ) ;
45+ return t ( 'Message deleted' ) ;
4646 }
4747
4848 if ( poll ) {
4949 if ( ! poll . vote_count ) {
5050 const createdBy =
5151 poll . created_by ?. id === channel . getClient ( ) . userID
52- ? t < string > ( 'You' )
53- : ( poll . created_by ?. name ?? t < string > ( 'Poll' ) ) ;
54- return t < string > ( '📊 {{createdBy}} created: {{ pollName}}' , {
52+ ? t ( 'You' )
53+ : ( poll . created_by ?. name ?? t ( 'Poll' ) ) ;
54+ return t ( '📊 {{createdBy}} created: {{ pollName}}' , {
5555 createdBy,
5656 pollName : poll . name ,
5757 } ) ;
@@ -63,12 +63,12 @@ export const getLatestMessagePreview = (
6363 latestVote && poll . options . find ( ( opt ) => opt . id === latestVote . option_id ) ;
6464
6565 if ( option && latestVote ) {
66- return t < string > ( '📊 {{votedBy}} voted: {{pollOptionText}}' , {
66+ return t ( '📊 {{votedBy}} voted: {{pollOptionText}}' , {
6767 pollOptionText : option . text ,
6868 votedBy :
6969 latestVote ?. user ?. id === channel . getClient ( ) . userID
70- ? t < string > ( 'You' )
71- : ( latestVote . user ?. name ?? t < string > ( 'Poll' ) ) ,
70+ ? t ( 'You' )
71+ : ( latestVote . user ?. name ?? t ( 'Poll' ) ) ,
7272 } ) ;
7373 }
7474 }
@@ -85,10 +85,10 @@ export const getLatestMessagePreview = (
8585 }
8686
8787 if ( latestMessage . attachments ?. length ) {
88- return t < string > ( '🏙 Attachment...' ) ;
88+ return t ( '🏙 Attachment...' ) ;
8989 }
9090
91- return t < string > ( 'Empty message...' ) ;
91+ return t ( 'Empty message...' ) ;
9292} ;
9393
9494export type GroupChannelDisplayInfo = { image ?: string ; name ?: string } [ ] ;
0 commit comments