⚡ Auto continue bot on whatsApp if starting block is input (#849)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ### Summary by CodeRabbit **New Features:** - Added WhatsApp integration feature to the Pro plan. **Refactor:** - Introduced the ability to exclude specific plans from being displayed in the Change Plan Modal. - Renamed the function `isProPlan` to `hasProPerks`, enhancing code readability and maintainability. - Updated the `EmbedButton` component to handle a new `lockTagPlan` property and use the `modal` function instead of the `Modal` component. **Chore:** - Removed the `whatsAppPhoneNumberId` field from the `Typebot` model across various files, simplifying the data structure of the model. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -8,19 +8,23 @@ import {
|
||||
useDisclosure,
|
||||
} from '@chakra-ui/react'
|
||||
import React from 'react'
|
||||
import { ChangePlanModal } from '@/features/billing/components/ChangePlanModal'
|
||||
import {
|
||||
ChangePlanModal,
|
||||
ChangePlanModalProps,
|
||||
} from '@/features/billing/components/ChangePlanModal'
|
||||
import { useI18n } from '@/locales'
|
||||
|
||||
type Props = {
|
||||
contentLabel: React.ReactNode
|
||||
buttonLabel?: string
|
||||
type?: string
|
||||
} & AlertProps
|
||||
} & AlertProps &
|
||||
Pick<ChangePlanModalProps, 'type' | 'excludedPlans'>
|
||||
|
||||
export const UnlockPlanAlertInfo = ({
|
||||
contentLabel,
|
||||
buttonLabel,
|
||||
type,
|
||||
excludedPlans,
|
||||
...props
|
||||
}: Props) => {
|
||||
const t = useI18n()
|
||||
@@ -45,7 +49,12 @@ export const UnlockPlanAlertInfo = ({
|
||||
>
|
||||
{buttonLabel ?? t('billing.upgradeAlert.buttonDefaultLabel')}
|
||||
</Button>
|
||||
<ChangePlanModal isOpen={isOpen} onClose={onClose} type={type} />
|
||||
<ChangePlanModal
|
||||
isOpen={isOpen}
|
||||
onClose={onClose}
|
||||
type={type}
|
||||
excludedPlans={excludedPlans}
|
||||
/>
|
||||
</Alert>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user