Skip to content

Commit 84b5bfb

Browse files
authored
Merge pull request #1864 from session-foundation/fix-pro-issues-7
fix: more pro qa issues fix 7
2 parents fc7fe06 + 6b33e1c commit 84b5bfb

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

ts/components/dialog/user-settings/pages/user-pro/ProNonOriginatingPage.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,13 @@ function ProInfoBlockDeviceLinked() {
192192
);
193193
}
194194

195-
function ProInfoBlockWebsite({ textElement }: { textElement: ReactNode }) {
195+
function ProInfoBlockWebsite({
196+
textElement,
197+
titleType,
198+
}: {
199+
textElement: ReactNode;
200+
titleType: 'via' | 'onThe';
201+
}) {
196202
const { data } = useProBackendProDetailsLocal();
197203
const storeOrPlatform = useStoreOrPlatformFromProvider(data);
198204

@@ -202,7 +208,7 @@ function ProInfoBlockWebsite({ textElement }: { textElement: ReactNode }) {
202208
textElement={
203209
<ProInfoBlockText>
204210
<strong>
205-
{tr('viaStoreWebsite', {
211+
{tr(titleType === 'via' ? 'viaStoreWebsite' : 'onPlatformWebsite', {
206212
platform: storeOrPlatform,
207213
})}
208214
</strong>
@@ -305,6 +311,7 @@ function ProInfoBlockUpdate() {
305311
}
306312
/>
307313
<ProInfoBlockWebsite
314+
titleType="via"
308315
textElement={
309316
<Localizer
310317
token="viaStoreWebsiteDescription"
@@ -347,6 +354,7 @@ function ProInfoBlockRenew() {
347354
<>
348355
<ProInfoBlockDeviceLinked />
349356
<ProInfoBlockWebsite
357+
titleType="onThe"
350358
textElement={
351359
<Localizer
352360
token="proAccessRenewPlatformStoreWebsite"
@@ -363,6 +371,8 @@ function ProInfoBlockRenew() {
363371

364372
function ProInfoBlockCancel() {
365373
const { data } = useProBackendProDetailsLocal();
374+
const storeOrPlatform = useStoreOrPlatformFromProvider(data);
375+
366376
return (
367377
<ProInfoBlockLayout
368378
titleElement={tr('proCancellation')}
@@ -387,10 +397,11 @@ function ProInfoBlockCancel() {
387397
}
388398
/>
389399
<ProInfoBlockWebsite
400+
titleType="onThe"
390401
textElement={
391402
<Localizer
392403
token="cancelProPlatformStore"
393-
platform_store={data.providerConstants.platform}
404+
platform_store={storeOrPlatform}
394405
platform_account={data.providerConstants.platform_account}
395406
/>
396407
}
@@ -472,6 +483,7 @@ function ProInfoBlockRefundIOS() {
472483
}
473484
/>
474485
<ProInfoBlockWebsite
486+
titleType="onThe"
475487
textElement={
476488
<Localizer
477489
token="requestRefundPlatformWebsite"

ts/components/dialog/user-settings/pages/user-pro/ProSettingsPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,6 @@ function ProSettings({ state }: SectionProps) {
492492
subText = { token: 'errorLoadingProAccess' };
493493
} else if (isLoading) {
494494
subText = { token: 'proAccessLoadingEllipsis' };
495-
} else if (data.isProcessingRefund) {
496-
subText = { token: 'processingRefundRequest', platform: data.providerConstants.platform };
497495
} else if (data.inGracePeriod) {
498496
subText = { token: 'proRenewalUnsuccessful' };
499497
} else if (data.autoRenew) {
@@ -509,6 +507,10 @@ function ProSettings({ state }: SectionProps) {
509507
{data.isProcessingRefund ? (
510508
<PanelIconButton
511509
text={{ token: 'proRequestedRefund' }}
510+
subText={{
511+
token: 'processingRefundRequest',
512+
platform: data.providerConstants.platform,
513+
}}
512514
dataTestId="update-access-settings-button"
513515
onClick={handleUpdateAccessClick}
514516
iconElement={<PanelIconLucideIcon unicode={LUCIDE_ICONS_UNICODE.CIRCLE_ALERT} />}

0 commit comments

Comments
 (0)