Skip to content

Commit

Permalink
fix(typebotLink): current typebot dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Aug 21, 2022
1 parent bd41d7f commit 93161b7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useTypebots } from 'services/typebots'
import { byId } from 'utils'

type Props = {
typebotId?: string
typebotId?: string | 'current'
currentWorkspaceId: string
onSelectTypebotId: (typebotId: string | 'current') => void
}
Expand Down Expand Up @@ -43,7 +43,9 @@ export const TypebotsDropdown = ({
return (
<HStack>
<SearchableDropdown
selectedItem={currentTypebot?.name}
selectedItem={
typebotId === 'current' ? 'Current typebot' : currentTypebot?.name
}
items={['Current typebot', ...(typebots ?? []).map((t) => t.name)]}
onValueChange={handleTypebotSelect}
placeholder={'Select a typebot'}
Expand Down

0 comments on commit 93161b7

Please sign in to comment.