|
|
@@ -9,38 +9,42 @@ type GroupPlanProps = Pick<
|
|
|
|
|
|
function GroupPlan({ subscription, plan, remainingTrialDays }: GroupPlanProps) {
|
|
|
const { t } = useTranslation()
|
|
|
+ const currentPlanLabel =
|
|
|
+ remainingTrialDays >= 0 ? (
|
|
|
+ remainingTrialDays === 1 ? (
|
|
|
+ <Trans i18nKey="trial_last_day" components={{ b: <strong /> }} />
|
|
|
+ ) : (
|
|
|
+ <Trans
|
|
|
+ i18nKey="trial_remaining_days"
|
|
|
+ components={{ b: <strong /> }}
|
|
|
+ values={{ days: remainingTrialDays }}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ ) : (
|
|
|
+ <Trans i18nKey="premium_plan_label" components={{ b: <strong /> }} />
|
|
|
+ )
|
|
|
|
|
|
return (
|
|
|
- <Tooltip
|
|
|
- description={t(
|
|
|
- subscription.teamName != null
|
|
|
- ? 'group_plan_with_name_tooltip'
|
|
|
- : 'group_plan_tooltip',
|
|
|
- { plan: plan.name, groupName: subscription.teamName }
|
|
|
- )}
|
|
|
- id="group-plan"
|
|
|
- overlayProps={{ placement: 'bottom' }}
|
|
|
- >
|
|
|
- <a
|
|
|
- href="/learn/how-to/Overleaf_premium_features"
|
|
|
- className="current-plan-label"
|
|
|
+ <>
|
|
|
+ <span className="current-plan-label visible-xs">{currentPlanLabel}</span>
|
|
|
+ <Tooltip
|
|
|
+ description={t(
|
|
|
+ subscription.teamName != null
|
|
|
+ ? 'group_plan_with_name_tooltip'
|
|
|
+ : 'group_plan_tooltip',
|
|
|
+ { plan: plan.name, groupName: subscription.teamName }
|
|
|
+ )}
|
|
|
+ id="group-plan"
|
|
|
+ overlayProps={{ placement: 'bottom' }}
|
|
|
>
|
|
|
- {remainingTrialDays >= 0 ? (
|
|
|
- remainingTrialDays === 1 ? (
|
|
|
- <Trans i18nKey="trial_last_day" components={{ b: <strong /> }} />
|
|
|
- ) : (
|
|
|
- <Trans
|
|
|
- i18nKey="trial_remaining_days"
|
|
|
- components={{ b: <strong /> }}
|
|
|
- values={{ days: remainingTrialDays }}
|
|
|
- />
|
|
|
- )
|
|
|
- ) : (
|
|
|
- <Trans i18nKey="premium_plan_label" components={{ b: <strong /> }} />
|
|
|
- )}{' '}
|
|
|
- <span className="info-badge" />
|
|
|
- </a>
|
|
|
- </Tooltip>
|
|
|
+ <a
|
|
|
+ href="/learn/how-to/Overleaf_premium_features"
|
|
|
+ className="current-plan-label hidden-xs"
|
|
|
+ >
|
|
|
+ {currentPlanLabel} <span className="info-badge" />
|
|
|
+ </a>
|
|
|
+ </Tooltip>
|
|
|
+ </>
|
|
|
)
|
|
|
}
|
|
|
|