Web: Client: Data Import: fix parseQuota util
This commit is contained in:
parent
0e92195133
commit
e574eee425
@ -55,7 +55,7 @@ const SelectUsersStep = ({
|
||||
|
||||
useEffect(() => {
|
||||
setSearchValue("");
|
||||
setQuota(parseQuota(quotaCharacteristics[1]));
|
||||
setQuota(parseQuota(t, quotaCharacteristics[1]));
|
||||
}, []);
|
||||
|
||||
const handleDataChange = (leftBoundary, rightBoundary) => {
|
||||
|
@ -88,7 +88,7 @@ const AddEmailsStep = (props) => {
|
||||
checkedUsers.withEmail.length + checkedUsers.withoutEmail.length;
|
||||
|
||||
useEffect(() => {
|
||||
setQuota(parseQuota(quotaCharacteristics[1]));
|
||||
setQuota(parseQuota(t, quotaCharacteristics[1]));
|
||||
}, []);
|
||||
|
||||
const totalUsedUsers =
|
||||
|
@ -59,7 +59,7 @@ const SelectUsersStep = (props) => {
|
||||
|
||||
useEffect(() => {
|
||||
setSearchValue("");
|
||||
setQuota(parseQuota(quotaCharacteristics[1]));
|
||||
setQuota(parseQuota(t, quotaCharacteristics[1]));
|
||||
}, []);
|
||||
|
||||
const handleDataChange = (leftBoundary, rightBoundary) => {
|
||||
|
@ -55,7 +55,7 @@ const SelectUsersStep = ({
|
||||
|
||||
useEffect(() => {
|
||||
setSearchValue("");
|
||||
setQuota(parseQuota(quotaCharacteristics[1]));
|
||||
setQuota(parseQuota(t, quotaCharacteristics[1]));
|
||||
}, []);
|
||||
|
||||
const handleDataChange = (leftBoundary, rightBoundary) => {
|
||||
|
@ -104,3 +104,11 @@ export interface LayoutProps {
|
||||
description: string;
|
||||
component: JSX.Element;
|
||||
}
|
||||
|
||||
export type TQuota = {
|
||||
id: string;
|
||||
priceTitle: string;
|
||||
type: string;
|
||||
used: { title: string; value: number };
|
||||
value: number;
|
||||
};
|
||||
|
@ -25,8 +25,9 @@
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
import { PortalFeaturesLimitations } from "@docspace/shared/enums";
|
||||
import { getConvertedSize } from "@docspace/shared/utils/common";
|
||||
import { TFunciton, TQuota } from "../types";
|
||||
|
||||
export const parseQuota = (quotaCharacteristics) => {
|
||||
export const parseQuota = (t: TFunciton, quotaCharacteristics: TQuota) => {
|
||||
const maxValue = quotaCharacteristics.value;
|
||||
const usedValue = quotaCharacteristics.used.value;
|
||||
|
Loading…
Reference in New Issue
Block a user