fix build
This commit is contained in:
parent
ebb87d8262
commit
cfe067155c
|
@ -3,9 +3,9 @@ import VerticallyCentered, { FlexWrapper } from 'components/Container';
|
||||||
import { AppContext } from 'pages/_app';
|
import { AppContext } from 'pages/_app';
|
||||||
import React, { useContext, useEffect } from 'react';
|
import React, { useContext, useEffect } from 'react';
|
||||||
import billingService from 'services/billingService';
|
import billingService from 'services/billingService';
|
||||||
import { getFamilyPlanAdmin } from 'utils/billing';
|
|
||||||
import { preloadImage } from 'utils/common';
|
import { preloadImage } from 'utils/common';
|
||||||
import constants from 'utils/strings/constants';
|
import constants from 'utils/strings/constants';
|
||||||
|
import { getFamilyPlanAdmin } from 'utils/user/family';
|
||||||
import DialogTitleWithCloseButton from './DialogBox/TitleWithCloseButton';
|
import DialogTitleWithCloseButton from './DialogBox/TitleWithCloseButton';
|
||||||
|
|
||||||
export function MemberSubscriptionManage({ open, userDetails, onClose }) {
|
export function MemberSubscriptionManage({ open, userDetails, onClose }) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import { UserDetails } from 'types/user';
|
import { UserDetails } from 'types/user';
|
||||||
import { isPartOfFamily } from 'utils/billing';
|
import { isPartOfFamily } from 'utils/user/family';
|
||||||
import StorageSection from '../storageSection';
|
import StorageSection from '../storageSection';
|
||||||
import { FamilyUsageSection } from './usageSection';
|
import { FamilyUsageSection } from './usageSection';
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { IndividualSubscriptionCardContent } from './individual';
|
import { IndividualSubscriptionCardContent } from './individual';
|
||||||
import { FamilySubscriptionCardContent } from './family';
|
import { FamilySubscriptionCardContent } from './family';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { hasNonAdminFamilyMembers } from 'utils/billing';
|
|
||||||
import { Overlay, SpaceBetweenFlex } from 'components/Container';
|
import { Overlay, SpaceBetweenFlex } from 'components/Container';
|
||||||
import { UserDetails } from 'types/user';
|
import { UserDetails } from 'types/user';
|
||||||
|
import { hasNonAdminFamilyMembers } from 'utils/user/family';
|
||||||
|
|
||||||
interface Iprops {
|
interface Iprops {
|
||||||
userDetails: UserDetails;
|
userDetails: UserDetails;
|
||||||
|
|
|
@ -2,9 +2,7 @@ import { GalleryContext } from 'pages/gallery';
|
||||||
import React, { MouseEventHandler, useContext, useMemo } from 'react';
|
import React, { MouseEventHandler, useContext, useMemo } from 'react';
|
||||||
import {
|
import {
|
||||||
hasPaidSubscription,
|
hasPaidSubscription,
|
||||||
isFamilyAdmin,
|
|
||||||
isOnFreePlan,
|
isOnFreePlan,
|
||||||
isPartOfFamily,
|
|
||||||
hasExceededStorageQuota,
|
hasExceededStorageQuota,
|
||||||
isSubscriptionActive,
|
isSubscriptionActive,
|
||||||
isSubscriptionCancelled,
|
isSubscriptionCancelled,
|
||||||
|
@ -15,6 +13,7 @@ import { UserDetails } from 'types/user';
|
||||||
import constants from 'utils/strings/constants';
|
import constants from 'utils/strings/constants';
|
||||||
import { Typography } from '@mui/material';
|
import { Typography } from '@mui/material';
|
||||||
import billingService from 'services/billingService';
|
import billingService from 'services/billingService';
|
||||||
|
import { isPartOfFamily, isFamilyAdmin } from 'utils/user/family';
|
||||||
|
|
||||||
export default function SubscriptionStatus({
|
export default function SubscriptionStatus({
|
||||||
userDetails,
|
userDetails,
|
||||||
|
|
|
@ -9,7 +9,7 @@ import SubscriptionStatus from './SubscriptionStatus';
|
||||||
import { Box, Skeleton } from '@mui/material';
|
import { Box, Skeleton } from '@mui/material';
|
||||||
import { MemberSubscriptionManage } from '../MemberSubscriptionManage';
|
import { MemberSubscriptionManage } from '../MemberSubscriptionManage';
|
||||||
import { GalleryContext } from 'pages/gallery';
|
import { GalleryContext } from 'pages/gallery';
|
||||||
import { isPartOfFamily, isFamilyAdmin } from 'utils/billing';
|
import { isPartOfFamily, isFamilyAdmin } from 'utils/user/family';
|
||||||
|
|
||||||
export default function UserDetailsSection({ sidebarView }) {
|
export default function UserDetailsSection({ sidebarView }) {
|
||||||
const galleryContext = useContext(GalleryContext);
|
const galleryContext = useContext(GalleryContext);
|
||||||
|
|
|
@ -11,8 +11,6 @@ import {
|
||||||
hasMobileSubscription,
|
hasMobileSubscription,
|
||||||
getLocalUserSubscription,
|
getLocalUserSubscription,
|
||||||
hasPaidSubscription,
|
hasPaidSubscription,
|
||||||
getTotalFamilyUsage,
|
|
||||||
isPartOfFamily,
|
|
||||||
isSubscriptionActive,
|
isSubscriptionActive,
|
||||||
} from 'utils/billing';
|
} from 'utils/billing';
|
||||||
import { reverseString } from 'utils/common';
|
import { reverseString } from 'utils/common';
|
||||||
|
@ -28,6 +26,7 @@ import { getLocalUserDetails } from 'utils/user';
|
||||||
import { PLAN_PERIOD } from 'constants/gallery';
|
import { PLAN_PERIOD } from 'constants/gallery';
|
||||||
import FreeSubscriptionPlanSelectorCard from './free';
|
import FreeSubscriptionPlanSelectorCard from './free';
|
||||||
import PaidSubscriptionPlanSelectorCard from './paid';
|
import PaidSubscriptionPlanSelectorCard from './paid';
|
||||||
|
import { isPartOfFamily, getTotalFamilyUsage } from 'utils/user/family';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
closeModal: any;
|
closeModal: any;
|
||||||
|
|
|
@ -49,7 +49,7 @@ export enum CustomError {
|
||||||
REQUEST_TIMEOUT = 'request taking too long',
|
REQUEST_TIMEOUT = 'request taking too long',
|
||||||
HIDDEN_COLLECTION_SYNC_FILE_ATTEMPTED = 'hidden collection sync file attempted',
|
HIDDEN_COLLECTION_SYNC_FILE_ATTEMPTED = 'hidden collection sync file attempted',
|
||||||
UNKNOWN_ERROR = 'Something went wrong, please try again',
|
UNKNOWN_ERROR = 'Something went wrong, please try again',
|
||||||
NOT_FILE_OWNER = 'You cannot delete files in a shared album',
|
NOT_FILE_OWNER = 'not file owner',
|
||||||
}
|
}
|
||||||
|
|
||||||
export function parseUploadErrorCodes(error) {
|
export function parseUploadErrorCodes(error) {
|
||||||
|
|
|
@ -642,6 +642,7 @@ const englishConstants = {
|
||||||
LEAVE_SHARED_ALBUM_TITLE: 'Leave shared album?',
|
LEAVE_SHARED_ALBUM_TITLE: 'Leave shared album?',
|
||||||
LEAVE_SHARED_ALBUM_MESSAGE:
|
LEAVE_SHARED_ALBUM_MESSAGE:
|
||||||
'You will leave the album, and it will stop being visible to you.',
|
'You will leave the album, and it will stop being visible to you.',
|
||||||
|
NOT_FILE_OWNER: 'You cannot delete files in a shared album',
|
||||||
CONFIRM_REMOVE_MESSAGE: () => (
|
CONFIRM_REMOVE_MESSAGE: () => (
|
||||||
<>
|
<>
|
||||||
<p>Are you sure you want to remove these files from the album?</p>
|
<p>Are you sure you want to remove these files from the album?</p>
|
||||||
|
|
Loading…
Reference in a new issue