fix(typebotLink): current typebot dropdown
This commit is contained in:
@ -9,7 +9,7 @@ import { useTypebots } from 'services/typebots'
|
|||||||
import { byId } from 'utils'
|
import { byId } from 'utils'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
typebotId?: string
|
typebotId?: string | 'current'
|
||||||
currentWorkspaceId: string
|
currentWorkspaceId: string
|
||||||
onSelectTypebotId: (typebotId: string | 'current') => void
|
onSelectTypebotId: (typebotId: string | 'current') => void
|
||||||
}
|
}
|
||||||
@ -43,7 +43,9 @@ export const TypebotsDropdown = ({
|
|||||||
return (
|
return (
|
||||||
<HStack>
|
<HStack>
|
||||||
<SearchableDropdown
|
<SearchableDropdown
|
||||||
selectedItem={currentTypebot?.name}
|
selectedItem={
|
||||||
|
typebotId === 'current' ? 'Current typebot' : currentTypebot?.name
|
||||||
|
}
|
||||||
items={['Current typebot', ...(typebots ?? []).map((t) => t.name)]}
|
items={['Current typebot', ...(typebots ?? []).map((t) => t.name)]}
|
||||||
onValueChange={handleTypebotSelect}
|
onValueChange={handleTypebotSelect}
|
||||||
placeholder={'Select a typebot'}
|
placeholder={'Select a typebot'}
|
||||||
|
Reference in New Issue
Block a user