Skip to content

Commit 815523a

Browse files
ButteryCrumpetRokt33r
authored andcommitted
update limit messages
1 parent 2b45639 commit 815523a

File tree

4 files changed

+25
-21
lines changed

4 files changed

+25
-21
lines changed

src/cloud/components/settings/TeamSubLimit.tsx

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -74,30 +74,32 @@ const TeamSubLimit = ({
7474
openSettingsTab('teamUpgrade')
7575
}}
7676
>
77-
<p className='note-limit'>
78-
{translate(lngKeys.SettingsSubLimitUsed, {
79-
docsNb: currentSubInfo.info.progressLabel,
80-
})}
81-
</p>
82-
<div className='progress-sm'>
83-
<div
84-
className={cc([
85-
'progress-bar',
86-
currentSubInfo.info.trialIsOver && 'over-limit',
87-
])}
88-
style={{ width: `${currentSubInfo.info.rate}%` }}
89-
/>
90-
</div>
91-
<p className='note-limit'>
92-
{translate(lngKeys.SettingsSubLimitTrialDate, {
93-
date: format(currentSubInfo.info.endDate, 'dd MMM, yyyy'),
94-
})}
95-
</p>
77+
{!currentSubInfo.info.cancelled && (
78+
<>
79+
<p className='note-limit'>
80+
{translate(lngKeys.SettingsSubLimitUsed, {
81+
docsNb: currentSubInfo.info.progressLabel,
82+
})}
83+
</p>
84+
<div className='progress-sm'>
85+
<div
86+
className={cc([
87+
'progress-bar',
88+
currentSubInfo.info.trialIsOver && 'over-limit',
89+
])}
90+
style={{ width: `${currentSubInfo.info.rate}%` }}
91+
/>
92+
</div>
93+
</>
94+
)}
9695
<p className='note-limit'>
9796
{translate(
9897
currentSubInfo.info.trialIsOver
9998
? lngKeys.SettingsSubLimitTrialEnd
100-
: lngKeys.SettingsSubLimitTrialUpgrade
99+
: lngKeys.SettingsSubLimitTrialUpgrade,
100+
{
101+
date: format(currentSubInfo.info.endDate, 'dd MMM, yyyy'),
102+
}
101103
)}
102104
</p>
103105
<Button

src/cloud/lib/i18n/enUS.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const enTranslation: TranslationSource = {
160160
[lngKeys.SettingsSubLimitTrialUpgrade]:
161161
'You can upgrade at anytime during your trial.',
162162
[lngKeys.SettingsSubLimitTrialEnd]:
163-
'Your pro plan trial has ended. Please upgrade now',
163+
'Your trial has ended at {{date}}. Please upgrade now.',
164164
[lngKeys.SettingsSubLimitUnderFreePlan]:
165165
'Under the free plan, you can create up to {{limit}} docs.',
166166

src/cloud/lib/stores/pageStore/store.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ function usePageDataStore(pageProps: any, navigatingBetweenPage: boolean) {
212212
return {
213213
trialing: false,
214214
info: {
215+
cancelled: !team.trial,
215216
trialIsOver: remaining < 1,
216217
progressLabel: `${max - remaining}/${max}`,
217218
endDate: end,

src/cloud/lib/stores/pageStore/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ type SubscriptionTrialInfo = {
5454
type SubscriptionInactiveInfo = {
5555
trialing: false
5656
info: {
57+
cancelled: boolean
5758
trialIsOver: boolean
5859
progressLabel: string
5960
rate: number

0 commit comments

Comments
 (0)