Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix(photos):hide-inapplicable-billing-period

Aswin Asokbf472a0ee77f
diff --git a/web/apps/photos/src/components/sidebar/Sidebar.tsx b/web/apps/photos/src/components/sidebar/Sidebar.tsx
index 59be50c578..875899d620 100644
--- a/web/apps/photos/src/components/sidebar/Sidebar.tsx
+++ b/web/apps/photos/src/components/sidebar/Sidebar.tsx
@@ -986,9 +986,13 @@ const Account: React.FC<AccountProps> = ({
}
const period = userDetails.subscription.period;
- const billingLabel = period
- ? t(period == "year" ? "yearly" : "monthly")
- : undefined;
+ const canShowBillingPeriod =
+ !isSubscriptionFree(userDetails.subscription) &&
+ (!isPartOfFamily(userDetails) || isFamilyAdmin(userDetails));
+ const billingLabel =
+ canShowBillingPeriod && period
+ ? t(period == "year" ? "yearly" : "monthly")
+ : undefined;
planSubtext = [formattedStorageByteSize(storage), billingLabel]
.filter(Boolean)