Skip to content

Commit

Permalink
fix: avatar in input(2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barresi committed Apr 16, 2024
1 parent 954fd93 commit b741014
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shared/ui/input-send-message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const InputSendMessage: FC<IInputSendMessageProps> = ({
}) => {
const [message, setMessage] = useState('')

const withAvatar = avatar ? 'pl-[80px]' : ''
const withAvatar = avatar !== undefined

return (
<form
Expand All @@ -31,7 +31,7 @@ const InputSendMessage: FC<IInputSendMessageProps> = ({
}}
className='w-full relative flex'
>
{avatar !== undefined && (
{withAvatar && (
<UserAvatar
src={avatar}
className='absolute top-[10px] z-50 left-[30px] w-[40px] h-[40px]'
Expand All @@ -40,7 +40,7 @@ const InputSendMessage: FC<IInputSendMessageProps> = ({
<Input
className={cn(
'py-[20px] px-[20px] pr-[60px] rounded-[10px]',
withAvatar,
withAvatar && 'pl-[80px]',
className
)}
onChange={(e) => {
Expand Down

0 comments on commit b741014

Please sign in to comment.