overleaf/services/web/frontend/js/features/subscription/components/dashboard/subscription-dashboard.tsx
Jessica Lawshe c8ef5e6f65 Merge pull request #11231 from overleaf/jel-react-subscriptions-dash-commons
[web] Migrate institution memberships dash to React

GitOrigin-RevId: 75bb8e7d7338418733a836a8e654fe5b0a9fceff
2023-01-18 15:09:28 +00:00

29 lines
945 B
TypeScript

import { useTranslation } from 'react-i18next'
import getMeta from '../../../../utils/meta'
import InstitutionMemberships from './institution-memberships'
import PremiumFeaturesLink from './premium-features-link'
function SubscriptionDashboard() {
const { t } = useTranslation()
const institutionMemberships = getMeta('ol-currentInstitutionsWithLicence')
const hasDisplayedSubscription = institutionMemberships?.length > 0
return (
<div className="container">
<div className="row">
<div className="col-md-8 col-md-offset-2">
<div className="card">
<div className="page-header">
<h1>{t('your_subscription')}</h1>
</div>
<InstitutionMemberships memberships={institutionMemberships} />
{hasDisplayedSubscription ? <PremiumFeaturesLink /> : <></>}
</div>
</div>
</div>
</div>
)
}
export default SubscriptionDashboard