diff --git a/src/components/progressSpace/index.tsx b/src/components/progressSpace/index.tsx
index e71bb60..b79865e 100644
--- a/src/components/progressSpace/index.tsx
+++ b/src/components/progressSpace/index.tsx
@@ -19,21 +19,28 @@ const ProgressSpace = ({ startSpace, endSpace }: ProgressSpaceProps) => {
- {endSpace}
- GB
+ {endSpace === "unlimited" ? "نامحدود" : endSpace}
+ {endSpace !== "unlimited" && GB}
{" "}
- حجم باقیمانده کانفیگ شما از {endSpace} گیگ {remaining}گیگ میباشد{" "}
+ حجم باقیمانده کانفیگ شما از{" "}
+ {endSpace === "unlimited" ? "نامحدود" : endSpace} گیگ{" "}
+ {remaining}
+ گیگ میباشد{" "}
>
diff --git a/src/pages/profile/section/ProductConfigList.tsx b/src/pages/profile/section/ProductConfigList.tsx
index d7191d4..25d9ab3 100644
--- a/src/pages/profile/section/ProductConfigList.tsx
+++ b/src/pages/profile/section/ProductConfigList.tsx
@@ -64,6 +64,8 @@ const ProductConfigList = ({
isDisabled={false}
isShowTraffic={item.show_traffic}
textCopy={item.url}
+ maxTraffic={item.max_traffic}
+ traffic={item.traffic}
/>
);
diff --git a/src/pages/profile/section/components/ConfigItem.tsx b/src/pages/profile/section/components/ConfigItem.tsx
index 863c638..07a9f53 100644
--- a/src/pages/profile/section/components/ConfigItem.tsx
+++ b/src/pages/profile/section/components/ConfigItem.tsx
@@ -14,6 +14,8 @@ const ConfigItem = ({
isDisabled,
isShowTraffic,
textCopy,
+ maxTraffic,
+ traffic,
}: ConfigItemProps) => {
const [isOpen, setIsOpen] = useState(false);
const [isOpenDropDown, setIsOpenDropDown] = useState(false);
@@ -40,6 +42,8 @@ const ConfigItem = ({
nameConfig={configName}
isShowTraffic={isShowTraffic}
textCopy={textCopy}
+ maxTraffic={maxTraffic}
+ traffic={traffic}
/>
{isDisabled && (
@@ -91,7 +95,7 @@ const ConfigItem = ({
حجم
-
+
)}
diff --git a/src/pages/profile/section/components/ModalConfigDetails.tsx b/src/pages/profile/section/components/ModalConfigDetails.tsx
index 2bd7c72..77c1521 100644
--- a/src/pages/profile/section/components/ModalConfigDetails.tsx
+++ b/src/pages/profile/section/components/ModalConfigDetails.tsx
@@ -14,7 +14,9 @@ const ModalConfigDetails = ({
dateBuy,
nameConfig,
isShowTraffic,
- textCopy
+ textCopy,
+ maxTraffic,
+ traffic
}: {
isOpen: boolean;
setIsOpen: Dispatch
>;
@@ -23,6 +25,8 @@ const ModalConfigDetails = ({
nameConfig: string;
isShowTraffic: boolean;
textCopy: string;
+ maxTraffic: number | "unlimited";
+ traffic: number;
}) => {
const navigate = useNavigate()
const copyToClipboard = async (textToCopy: string) => {
@@ -64,9 +68,9 @@ const ModalConfigDetails = ({
>
)}
- {!isDisabled || isShowTraffic && (
+ {!isDisabled && isShowTraffic && (
)}
diff --git a/src/types/props.d.ts b/src/types/props.d.ts
index abbff3a..d91e0f6 100644
--- a/src/types/props.d.ts
+++ b/src/types/props.d.ts
@@ -128,6 +128,8 @@ export interface ConfigItemProps {
isDisabled: boolean;
isShowTraffic: boolean;
textCopy: string;
+ maxTraffic: number | "unlimited";
+ traffic: number;
}
// نوع Item برای آیتمهای داخل Dropdown
@@ -145,7 +147,7 @@ export interface DropdownProps {
export interface ProgressSpaceProps {
startSpace: number;
- endSpace: number | "ultimate";
+ endSpace: number | "unlimited";
}
export interface LoginFormValues {