diff --git a/packages/bot-engine/src/components/avatars/Avatar.tsx b/packages/bot-engine/src/components/avatars/Avatar.tsx index e3d41a1e15..e1f0faa3fe 100644 --- a/packages/bot-engine/src/components/avatars/Avatar.tsx +++ b/packages/bot-engine/src/components/avatars/Avatar.tsx @@ -1,10 +1,12 @@ -import React from 'react' +import React, { useState } from 'react' import { isDefined } from 'utils' import { DefaultAvatar } from './DefaultAvatar' export const Avatar = ({ avatarSrc }: { avatarSrc?: string }): JSX.Element => { - if (avatarSrc === '') return <> - if (isDefined(avatarSrc)) + const [currentAvatarSrc] = useState(avatarSrc) + + if (currentAvatarSrc === '') return <> + if (isDefined(currentAvatarSrc)) return (
{ } > Bot avatar