mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
124306d7ac
[web] Show price in change to group plan modal on React subscription dash GitOrigin-RevId: 6a1a4be3a7d008cd9e26186c2d97bc0bdc2f82ed
31 lines
1,007 B
TypeScript
31 lines
1,007 B
TypeScript
import { ActiveSubscription } from '../../../../../frontend/js/features/subscription/components/dashboard/states/active/active'
|
|
import { Subscription } from '../../../../../types/subscription/dashboard/subscription'
|
|
import { groupPlans, plans } from '../fixtures/plans'
|
|
import { renderWithSubscriptionDashContext } from './render-with-subscription-dash-context'
|
|
|
|
export function renderActiveSubscription(
|
|
subscription: Subscription,
|
|
tags: { name: string; value: string | object | Array<object> }[] = [],
|
|
currencyCode?: string
|
|
) {
|
|
const renderOptions = {
|
|
currencyCode,
|
|
metaTags: [
|
|
...tags,
|
|
{ name: 'ol-plans', value: plans },
|
|
{
|
|
name: 'ol-groupPlans',
|
|
value: groupPlans,
|
|
},
|
|
{ name: 'ol-subscription', value: subscription },
|
|
{
|
|
name: 'ol-recommendedCurrency',
|
|
value: currencyCode || 'USD',
|
|
},
|
|
],
|
|
}
|
|
renderWithSubscriptionDashContext(
|
|
<ActiveSubscription subscription={subscription} />,
|
|
renderOptions
|
|
)
|
|
}
|