Inline
This commit is contained in:
@@ -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}>
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user