Merge pull request #13932 from overleaf/bg-managed-users-hide-reactivate-button

hide button to reactivate subscription for managed users

GitOrigin-RevId: 3632c5ffdee68eb5e0aed1479f3b7ffb45e3aa4a
This commit is contained in:
Brian Gough 2023-07-20 11:14:12 +01:00 committed by Copybot
parent 37b42fc20b
commit d298a258e0

View file

@ -3,6 +3,7 @@ import { postJSON } from '../../../../infrastructure/fetch-json'
import { reactivateSubscriptionUrl } from '../../data/subscription-url'
import useAsync from '../../../../shared/hooks/use-async'
import { useLocation } from '../../../../shared/hooks/use-location'
import getMeta from '../../../../utils/meta'
function ReactivateSubscription() {
const { t } = useTranslation()
@ -17,6 +18,11 @@ function ReactivateSubscription() {
location.reload()
}
// Don't show the button to reactivate the subscription for managed users
if (getMeta('ol-cannot-reactivate-subscription')) {
return null
}
return (
<button
type="button"