🐛 (limits) Fix storage limit trigger and e2e tests
This commit is contained in:
committed by
Baptiste Arnaud
parent
1e26703ad4
commit
30dff2d5d7
@ -36,11 +36,10 @@ export const EditableUrl = ({
|
||||
<Tooltip label="Edit">
|
||||
<EditablePreview
|
||||
mx={1}
|
||||
bgColor="blue.500"
|
||||
color="white"
|
||||
borderWidth="1px"
|
||||
px={3}
|
||||
rounded="md"
|
||||
cursor="pointer"
|
||||
cursor="text"
|
||||
display="flex"
|
||||
fontWeight="semibold"
|
||||
/>
|
||||
|
@ -4,18 +4,20 @@ import {
|
||||
HStack,
|
||||
IconButton,
|
||||
Stack,
|
||||
Tag,
|
||||
Wrap,
|
||||
Text,
|
||||
} from '@chakra-ui/react'
|
||||
import { TrashIcon } from 'assets/icons'
|
||||
import { UpgradeButton } from 'components/shared/buttons/UpgradeButton'
|
||||
import { useToast } from 'components/shared/hooks/useToast'
|
||||
import { LimitReached } from 'components/shared/modals/ChangePlanModal'
|
||||
import { PlanTag } from 'components/shared/PlanTag'
|
||||
import { useTypebot } from 'contexts/TypebotContext/TypebotContext'
|
||||
import { useWorkspace } from 'contexts/WorkspaceContext'
|
||||
import { Plan } from 'db'
|
||||
import React from 'react'
|
||||
import { parseDefaultPublicId } from 'services/typebots'
|
||||
import { isFreePlan } from 'services/workspace'
|
||||
import { isWorkspaceProPlan } from 'services/workspace'
|
||||
import { getViewerUrl, isDefined, isNotDefined } from 'utils'
|
||||
import { CustomDomainsDropdown } from './customDomain/CustomDomainsDropdown'
|
||||
import { EditableUrl } from './EditableUrl'
|
||||
@ -80,19 +82,18 @@ export const ShareContent = () => {
|
||||
/>
|
||||
</HStack>
|
||||
)}
|
||||
{isFreePlan(workspace) ? (
|
||||
<UpgradeButton colorScheme="gray">
|
||||
<Text mr="2">Add my domain</Text>{' '}
|
||||
<Tag colorScheme="orange">Pro</Tag>
|
||||
</UpgradeButton>
|
||||
{isWorkspaceProPlan(workspace) &&
|
||||
isNotDefined(typebot?.customDomain) ? (
|
||||
<CustomDomainsDropdown
|
||||
onCustomDomainSelect={handleCustomDomainChange}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
{isNotDefined(typebot?.customDomain) && (
|
||||
<CustomDomainsDropdown
|
||||
onCustomDomainSelect={handleCustomDomainChange}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
<UpgradeButton
|
||||
colorScheme="gray"
|
||||
limitReachedType={LimitReached.CUSTOM_DOMAIN}
|
||||
>
|
||||
<Text mr="2">Add my domain</Text> <PlanTag plan={Plan.PRO} />
|
||||
</UpgradeButton>
|
||||
)}
|
||||
</Stack>
|
||||
|
||||
|
Reference in New Issue
Block a user