Skip to content

armgit / ente

Public Imported from GitHub
0

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

Inline

Manav Rathi19f18fe03239
diff --git a/web/apps/photos/src/components/pages/gallery/PlanSelector.tsx b/web/apps/photos/src/components/pages/gallery/PlanSelector.tsx
index c016bbe0dd..859a2d3cc0 100644
--- a/web/apps/photos/src/components/pages/gallery/PlanSelector.tsx
+++ b/web/apps/photos/src/components/pages/gallery/PlanSelector.tsx
@@ -1,5 +1,6 @@
import log from "@/base/log";
import { bytesInGB, formattedStorageByteSize } from "@/new/photos/utils/units";
+import { openURL } from "@/new/photos/utils/web";
import {
FlexWrapper,
FluidContainer,
@@ -46,7 +47,6 @@ import {
isSubscriptionActive,
isSubscriptionCancelled,
isUserSubscribedPlan,
- manageFamilyMethod,
planForSubscription,
planSelectionOutcome,
updatePaymentMethod,
@@ -686,9 +686,8 @@ function ManageSubscription({
closeModal,
setLoading,
}: ManageSubscriptionProps) {
- const appContext = useContext(AppContext);
const openFamilyPortal = () =>
- manageFamilyMethod(appContext.setDialogMessage, setLoading);
+ openURL("https://web.ente.io?redirect=families");
return (
<Stack spacing={1}>
diff --git a/web/apps/photos/src/constants/redirects.ts b/web/apps/photos/src/constants/redirects.ts
index 92b5cd1b87..e69de29bb2 100644
--- a/web/apps/photos/src/constants/redirects.ts
+++ b/web/apps/photos/src/constants/redirects.ts
@@ -1,9 +0,0 @@
-export enum REDIRECTS {
- FAMILIES = "families",
-}
-
-export const getRedirectURL = (redirect: REDIRECTS) => {
- const url = new URL("https://web.ente.io");
- url.searchParams.set("redirect", redirect);
- return url.href;
-};
diff --git a/web/apps/photos/src/utils/billing/index.ts b/web/apps/photos/src/utils/billing/index.ts
index 50366e0407..7fd9937ab9 100644
--- a/web/apps/photos/src/utils/billing/index.ts
+++ b/web/apps/photos/src/utils/billing/index.ts
@@ -2,7 +2,6 @@ import log from "@/base/log";
import { openURL } from "@/new/photos/utils/web";
import { SetDialogBoxAttributes } from "@ente/shared/components/DialogBox/types";
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
-import { REDIRECTS, getRedirectURL } from "constants/redirects";
import { t } from "i18next";
import type { NextRouter } from "next/router";
import billingService from "services/billingService";
@@ -253,8 +252,7 @@ export async function manageFamilyMethod(
) {
try {
setLoading(true);
- const familyPortalRedirectURL = getRedirectURL(REDIRECTS.FAMILIES);
- openURL(familyPortalRedirectURL);
+ ;
} catch (e) {
log.error("failed to redirect to family portal", e);
setDialogMessage({