Skip to content

armgit / ente

Public Imported from GitHub
0

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

Revert free-plan upgrade CTA in sidebar

Anand Baburajandf5d6fc7d645
diff --git a/web/apps/photos/src/components/Sidebar.tsx b/web/apps/photos/src/components/Sidebar.tsx
index 78fef64f31..30d441f86a 100644
--- a/web/apps/photos/src/components/Sidebar.tsx
+++ b/web/apps/photos/src/components/Sidebar.tsx
@@ -589,12 +589,10 @@ const SubscriptionStatus: React.FC<SubscriptionStatusProps> = ({
const hasAddOnBonus = userDetailsAddOnBonuses(userDetails).length > 0;
let message: React.ReactNode;
- let showUpgradeText = false;
if (!hasAddOnBonus) {
if (isSubscriptionActive(userDetails.subscription)) {
if (isSubscriptionFree(userDetails.subscription)) {
message = t("subscription_info_free");
- showUpgradeText = true;
} else if (isSubscriptionCancelled(userDetails.subscription)) {
message = t("subscription_info_renewal_cancelled", {
date: userDetails.subscription.expiryTime,
@@ -623,39 +621,13 @@ const SubscriptionStatus: React.FC<SubscriptionStatusProps> = ({
return (
<Box sx={{ px: 1, pt: 0.5 }}>
- <Stack
- direction="row"
- sx={{ alignItems: "center", justifyContent: "space-between" }}
+ <Typography
+ variant="small"
+ onClick={handleClick}
+ sx={{ color: "text.muted" }}
>
- <Typography
- variant="small"
- onClick={handleClick}
- sx={{ color: "text.muted" }}
- >
- {message}
- </Typography>
- {showUpgradeText && (
- <Stack
- direction="row"
- onClick={onShowPlanSelector}
- sx={{
- alignItems: "center",
- cursor: "pointer",
- "&:hover": { opacity: 0.8 },
- }}
- >
- <Typography
- variant="small"
- sx={{ color: "text.base", fontWeight: "medium" }}
- >
- {t("upgrade")}
- </Typography>
- <ChevronRightIcon
- sx={{ fontSize: "18px", color: "text.muted" }}
- />
- </Stack>
- )}
- </Stack>
+ {message}
+ </Typography>
</Box>
);
};