Skip to content

armgit / ente

Public Imported from GitHub
0

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

Clean up

Neeraj Gupta6e0fa28a1813
diff --git a/apps/photos/src/components/pages/gallery/PlanSelector/card/index.tsx b/apps/photos/src/components/pages/gallery/PlanSelector/card/index.tsx
index d7969504d5..9107d9f3f1 100644
--- a/apps/photos/src/components/pages/gallery/PlanSelector/card/index.tsx
+++ b/apps/photos/src/components/pages/gallery/PlanSelector/card/index.tsx
@@ -1,4 +1,4 @@
-import React, { useContext, useEffect, useMemo, useState } from 'react';
+import React, { useContext, useMemo, useState } from 'react';
import { Plan } from 'types/billing';
import {
isUserSubscribedPlan,
@@ -47,7 +47,7 @@ function PlanSelectorCard(props: Props) {
const bonusData = useMemo(() => {
const userDetails = getLocalUserDetails();
if (!userDetails) {
- return 0;
+ return null;
}
return userDetails.bonusData;
}, []);
diff --git a/apps/photos/src/components/pages/gallery/PlanSelector/manageSubscription/index.tsx b/apps/photos/src/components/pages/gallery/PlanSelector/manageSubscription/index.tsx
index ccdc5991af..31b34ce162 100644
--- a/apps/photos/src/components/pages/gallery/PlanSelector/manageSubscription/index.tsx
+++ b/apps/photos/src/components/pages/gallery/PlanSelector/manageSubscription/index.tsx
@@ -1,6 +1,6 @@
import { Stack } from '@mui/material';
import { AppContext } from 'pages/_app';
-import React, { useContext, useEffect } from 'react';
+import React, { useContext } from 'react';
import { Trans } from 'react-i18next';
import { t } from 'i18next';
import { Subscription } from 'types/billing';
@@ -34,12 +34,6 @@ export function ManageSubscription({
const openFamilyPortal = () =>
manageFamilyMethod(appContext.setDialogMessage, setLoading);
- // define a function that will be only called once when component mounts
- // this is to prevent the dialog from being opened on every render
- useEffect(() => {
- console.log('bonusData:', bonusData);
- }, [bonusData]);
-
return (
<Stack spacing={1}>
{hasStripeSubscription(subscription) && (