Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

refactor(web): Fix no-null-render: StripeKeepPlanButton.tsx (#18222)

Ben Bachem798e2d86f849
diff --git a/web/src/ee/features/billing/components/BillingSwitchPlanDialog.tsx b/web/src/ee/features/billing/components/BillingSwitchPlanDialog.tsx
index 9cc72eb645..543b78a61d 100644
--- a/web/src/ee/features/billing/components/BillingSwitchPlanDialog.tsx
+++ b/web/src/ee/features/billing/components/BillingSwitchPlanDialog.tsx
@@ -178,9 +178,10 @@ export const BillingSwitchPlanDialog = ({
/>
)}
{!cancellation?.isCancelled &&
- scheduledPlanSwitch && (
+ scheduledPlanSwitch &&
+ organization?.id && (
<StripeKeepPlanButton
- orgId={organization?.id}
+ orgId={organization.id}
stripeProductId={product.stripeProductId}
onProcessing={setProcessingPlanId}
processing={
diff --git a/web/src/ee/features/billing/components/StripeKeepPlanButton.tsx b/web/src/ee/features/billing/components/StripeKeepPlanButton.tsx
index d9ae564feb..006c12defb 100644
--- a/web/src/ee/features/billing/components/StripeKeepPlanButton.tsx
+++ b/web/src/ee/features/billing/components/StripeKeepPlanButton.tsx
@@ -1,4 +1,4 @@
-/* eslint-disable @repo/no-abstracted-overlay-trigger, @repo/no-null-render */
+/* eslint-disable @repo/no-abstracted-overlay-trigger */
import { useState } from "react";
import { Button } from "@/src/components/ui/button";
import {
@@ -21,7 +21,7 @@ export const StripeKeepPlanButton = ({
onProcessing,
processing,
}: {
- orgId: string | undefined;
+ orgId: string;
stripeProductId: string;
onProcessing: (id: string | null) => void;
processing: boolean;
@@ -42,8 +42,6 @@ export const StripeKeepPlanButton = ({
},
});
- if (!orgId) return null;
-
return (
<Dialog>
<DialogTrigger asChild>