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

View File

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

View File

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

View File

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

View File

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