mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 02:35:20 -05:00
d2fb800174
[web] Display a message for custom personal subscriptions in React dash GitOrigin-RevId: c70986ffacfdfdeccd3675385e2e5dba1a2ad61f
31 lines
1,021 B
TypeScript
31 lines
1,021 B
TypeScript
import { ActiveSubscription } from '../../../../../frontend/js/features/subscription/components/dashboard/states/active/active'
|
|
import { RecurlySubscription } from '../../../../../types/subscription/dashboard/subscription'
|
|
import { groupPlans, plans } from '../fixtures/plans'
|
|
import { renderWithSubscriptionDashContext } from './render-with-subscription-dash-context'
|
|
|
|
export function renderActiveSubscription(
|
|
subscription: RecurlySubscription,
|
|
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
|
|
)
|
|
}
|