File tree 2 files changed +22
-21
lines changed
app/(protected)/(main)/messages
2 files changed +22
-21
lines changed Original file line number Diff line number Diff line change @@ -29,23 +29,20 @@ const MessagesPage = () => {
29
29
} , [ ] ) ;
30
30
31
31
return (
32
- < div >
33
- < h1 > Messages</ h1 >
34
- < div >
35
- { chatrooms . map ( ( chatroom ) => {
36
- console . log ( "chatroom: " , chatroom ) ;
37
- return (
38
- < Conversation
39
- key = { chatroom . chatroomId }
40
- chatroomId = { chatroom . chatroomId }
41
- username = { chatroom . username }
42
- display_name = { chatroom . display_name }
43
- profile_avatar = { chatroom . profile_avatar }
44
- lastMessageSentAt = { chatroom . lastMessageSentAt }
45
- />
46
- ) ;
47
- } ) }
48
- </ div >
32
+ < div className = "m-4 flex flex-col gap-4" >
33
+ { chatrooms . map ( ( chatroom ) => {
34
+ console . log ( "chatroom: " , chatroom ) ;
35
+ return (
36
+ < Conversation
37
+ key = { chatroom . chatroomId }
38
+ chatroomId = { chatroom . chatroomId }
39
+ username = { chatroom . username }
40
+ display_name = { chatroom . display_name }
41
+ profile_avatar = { chatroom . profile_avatar }
42
+ lastMessageSentAt = { chatroom . lastMessageSentAt }
43
+ />
44
+ ) ;
45
+ } ) }
49
46
</ div >
50
47
) ;
51
48
} ;
Original file line number Diff line number Diff line change @@ -48,12 +48,16 @@ export const Conversation = ({
48
48
} ;
49
49
50
50
return (
51
- < Link href = { `/${ username } /${ chatroomId } ` } onClick = { handleStartMessage } >
52
- < Avatar url = { profile_avatar } type = "conversation" />
53
- < div >
51
+ < Link
52
+ href = { `/${ username } /${ chatroomId } ` }
53
+ onClick = { handleStartMessage }
54
+ className = "flex text-center text-text-white font-semibold border-b border-surface shadow-md justify-between gap-2 hover:border-primary-500 transition duration-300 p-4"
55
+ >
56
+ < div className = "flex items-center gap-4" >
57
+ < Avatar url = { profile_avatar } type = "conversation" />
54
58
< p > { display_name } </ p >
55
- < p > { formatTime ( lastMessageSentAt ) } </ p >
56
59
</ div >
60
+ < p > { formatTime ( lastMessageSentAt ) } </ p >
57
61
</ Link >
58
62
) ;
59
63
} ;
You can’t perform that action at this time.
0 commit comments