refactor: drop dead planKey prop, cross-link the upsell enum mirror

This commit is contained in:
Víctor Falcón 2026-07-18 13:32:02 +02:00
parent 041b2147de
commit d008427c22
3 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,10 @@ namespace App\Enums;
* attribute revenue to each upgrade prompt. The value is carried into Stripe as
* subscription metadata and persisted onto the local subscription so revenue
* can be measured per upsell point.
*
* Mirrored on the frontend by the UpsellSource union in
* resources/js/components/subscription/upgrade-dialog.tsx keep both in sync
* when adding a point (an unknown value is silently dropped by tryFrom()).
*/
enum UpsellSource: string
{

View File

@ -31,7 +31,6 @@ export function PlanCard({
currency,
locale,
}: {
planKey: string;
plan: Plan;
isSelected: boolean;
onSelect: () => void;
@ -123,7 +122,6 @@ export function UpgradeDialog({
{planEntries.map(([key, plan]) => (
<PlanCard
key={key}
planKey={key}
plan={plan}
isSelected={key === selectedPlan}
onSelect={() => setSelectedPlan(key)}

View File

@ -139,7 +139,6 @@ function UpgradeSection({
{planEntries.map(([key, plan]) => (
<PlanCard
key={key}
planKey={key}
plan={plan}
isSelected={key === selectedPlan}
onSelect={() => setSelectedPlan(key)}