Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): width of user avatar in message preview of mobile #706

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ type MessagePreview = { message: MessageBlock, user?: UserFields }
const MessagePreview = ({ message, user }: MessagePreview) => {
return (
<div className='px-2 mt-3 py-1 rounded-md flex'>
<UserAvatarBlock message={message} user={user} />
<div>
<UserAvatarBlock message={message} user={user} />
</div>
<div className='overflow-x-clip'>
<div className='flex items-end pb-1.5'>
<IonText className='font-bold text-zinc-50 text-sm'>{user?.full_name ?? message.data.owner}</IonText>
<IonText className='text-xs pl-1.5 text-zinc-500'>{DateObjectToTimeString(message.data.creation)}</IonText>
</div>
{message.data.message_type === 'Text' && <div className='text-base line-clamp-3'>{message.data.content}</div>}
{message.data.message_type === 'Text' && <div className='text-base line-clamp-3 text-ellipsis'>{message.data.content}</div>}
{message.data.message_type === 'Image' && <div className='flex items-center space-x-2'>
<img src={message.data.file} alt={`Image`} className='inline-block w-10 h-10 rounded-md' />
<p className='text-sm font-semibold'>📸 &nbsp;Image</p>
Expand Down
Loading