refactor: drop dead planKey prop, cross-link the upsell enum mirror
This commit is contained in:
parent
041b2147de
commit
d008427c22
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,6 @@ function UpgradeSection({
|
|||
{planEntries.map(([key, plan]) => (
|
||||
<PlanCard
|
||||
key={key}
|
||||
planKey={key}
|
||||
plan={plan}
|
||||
isSelected={key === selectedPlan}
|
||||
onSelect={() => setSelectedPlan(key)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue