Skip to content

Commit

Permalink
feat(bot): ♿️ Make multiple avatar possible
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Jun 25, 2022
1 parent bd2b906 commit d7b9bda
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/bot-engine/src/components/avatars/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
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 (
<figure
className={
'flex justify-center items-center rounded-full text-white w-6 h-6 text-sm relative xs:w-10 xs:h-10 xs:text-xl'
}
>
<img
src={avatarSrc}
src={currentAvatarSrc}
alt="Bot avatar"
className="rounded-full object-cover w-full h-full"
/>
Expand Down

5 comments on commit d7b9bda

@vercel
Copy link

@vercel vercel bot commented on d7b9bda Jun 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./apps/docs

docs-git-main-typebot-io.vercel.app
docs.typebot.io
docs-typebot-io.vercel.app

@vercel
Copy link

@vercel vercel bot commented on d7b9bda Jun 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on d7b9bda Jun 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

app.typebot.io
builder-v2-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app

@vercel
Copy link

@vercel vercel bot commented on d7b9bda Jun 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on d7b9bda Jun 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

viewer-v2-alpha – ./apps/viewer

sat.cr8.ai
bt.id8rs.com
vhpage.cr8.ai
an.nigerias.io
bot.aws.bj
am.nigerias.io
ar.nigerias.io
apr.nigerias.io
apo.nigerias.io
aso.nigerias.io
chat.sureb4.com
eventhub.com.au
games.klujo.com
bot.piccinato.co
clo.closeer.work
bot.upfunnel.art
sakuranembro.it
feedback.ofx.one
faqs.nigerias.io
stan.vselise.com
app.chatforms.net
gentleman-shop.fr
voicehelp.cr8.ai
this-is-a-test.com
goalsettingbot.com
bot.eventhub.com.au
zap.techadviser.in
typebot.stillio.com
bot.ansuraniphone.my
forms.webisharp.com
bot.cotemeuplano.com
get.freebotoffer.xyz
chat.hayurihijab.com
bot.incusservices.com
bbutton.wpwakanda.com
abutton.wpwakanda.com
chat.missarkansas.org
bot.meuesocial.com.br
cdd.searchcube.com.sg
sbutton.wpwakanda.com
apply.ansuraniphone.my
c23111azqw.nigerias.io
felipewelington.com.br
bbutton.wpwwakanda.com
form.searchcube.com.sg
gcase.barrettamario.it
kodawariab736.skeep.it
info.clickasuransi.com
view.onlinebotdemo.xyz
83242573.actualizar.xyz
mainmenu.diddancing.com
91181264.your-access.one
form.sergiolimajr.com.br
hunterbot.saleshunter.ai
type.opaulovieira.com.br
aibot.angrybranding.co.uk
type.dericsoncalari.com.br
boyfriend-breakup.riku.ai
designguide.techyscouts.com
piazzatorre.barrettamario.it
type.talitasouzamarques.com.br
onboarding.libertydreamcare.ie
agendamento.sergiolimajr.com.br
bot.comercializadoraomicron.com
personal-trainer.barrettamario.it
studiotecnicoimmobiliaremerelli.it
preagendamento.sergiolimajr.com.br
viewer-v2-alpha-typebot-io.vercel.app
bookings.littlepartymonkeys.com
viewer-v2-alpha-git-main-typebot-io.vercel.app

Please sign in to comment.