2
0

feat(editor): ️ Add 'Current' to Link typebot

This commit is contained in:
Baptiste Arnaud
2022-03-25 14:59:40 +01:00
parent d06cbeac73
commit fb60dcf5ff
8 changed files with 29 additions and 12 deletions

View File

@ -10,7 +10,10 @@ type Props = {
export const TypebotLinkContent = ({ step }: Props) => {
const { linkedTypebots, typebot } = useTypebot()
const isCurrentTypebot = typebot && step.options.typebotId === typebot.id
const isCurrentTypebot =
typebot &&
(step.options.typebotId === typebot.id ||
step.options.typebotId === 'current')
const linkedTypebot = isCurrentTypebot
? typebot
: linkedTypebots?.find(byId(step.options.typebotId))