feat: ai fix

This commit is contained in:
Nevo David 2024-07-07 13:29:58 +07:00
parent 4be166b9c4
commit f0ff07b7bf
5 changed files with 6 additions and 6 deletions

View File

@ -66,7 +66,7 @@ export const LifetimeDeal = () => {
list.push(`Unlimited team members`); list.push(`Unlimited team members`);
} }
if (currentPricing.ai) { if (currentPricing?.ai) {
list.push(`AI auto-complete`); list.push(`AI auto-complete`);
} }
@ -92,7 +92,7 @@ export const LifetimeDeal = () => {
list.push(`Unlimited team members`); list.push(`Unlimited team members`);
} }
if (currentPricing.ai) { if (currentPricing?.ai) {
list.push(`AI auto-complete`); list.push(`AI auto-complete`);
} }

View File

@ -104,7 +104,7 @@ export const Features: FC<{
list.push(`Unlimited team members`); list.push(`Unlimited team members`);
} }
if (currentPricing.ai) { if (currentPricing?.ai) {
list.push(`AI auto-complete`); list.push(`AI auto-complete`);
} }

View File

@ -340,7 +340,7 @@ export const AddEditModal: FC<{
return ( return (
<> <>
{user?.tier.ai && ( {user?.tier?.ai && (
<CopilotPopup <CopilotPopup
hitEscapeToClose={false} hitEscapeToClose={false}
clickOutsideToClose={true} clickOutsideToClose={true}

View File

@ -366,7 +366,7 @@ export const GeneratorComponent = () => {
const modal = useModals(); const modal = useModals();
const generate = useCallback(async () => { const generate = useCallback(async () => {
if (!user?.tier.ai) { if (!user?.tier?.ai) {
if ( if (
await deleteDialog( await deleteDialog(
'You need to upgrade to use this feature', 'You need to upgrade to use this feature',

View File

@ -194,7 +194,7 @@ export const LaunchesComponent = () => {
))} ))}
</div> </div>
<AddProviderButton update={() => update(true)} /> <AddProviderButton update={() => update(true)} />
{sortedIntegrations?.length > 0 && user?.tier.ai && <GeneratorComponent />} {sortedIntegrations?.length > 0 && user?.tier?.ai && <GeneratorComponent />}
</div> </div>
<div className="flex-1 flex flex-col gap-[14px]"> <div className="flex-1 flex flex-col gap-[14px]">
<Filters /> <Filters />