fix(ModalBuy): enhance traffic and user limit display with conditional rendering
This commit is contained in:
@@ -295,13 +295,17 @@ const ModalBuy = ({ isOpen, setIsOpen, configId }: ModalBuyProps) => {
|
|||||||
<div className="w-full h-full flex flex-col justify-between items-center gap-2 text-xs md:text-sm">
|
<div className="w-full h-full flex flex-col justify-between items-center gap-2 text-xs md:text-sm">
|
||||||
<div className="w-full h-full bg-gray-900/50 rounded-md shadow flex justify-between items-center p-3">
|
<div className="w-full h-full bg-gray-900/50 rounded-md shadow flex justify-between items-center p-3">
|
||||||
<p>حجم</p>
|
<p>حجم</p>
|
||||||
|
{data?.data?.result?.traffic === 0 ? (
|
||||||
|
<p>نامحدود</p>
|
||||||
|
) : (
|
||||||
<p dir="ltr">{`${data?.data?.result?.traffic} ${
|
<p dir="ltr">{`${data?.data?.result?.traffic} ${
|
||||||
data?.data?.result?.is_test ? "MB" : "GB"
|
data?.data?.result?.is_test ? "MB" : "GB"
|
||||||
}`}</p>
|
}`}</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full h-full bg-gray-900/50 rounded-md shadow flex justify-between items-center p-3">
|
<div className="w-full h-full bg-gray-900/50 rounded-md shadow flex justify-between items-center p-3">
|
||||||
<p>محدودیت کاربر</p>
|
<p>محدودیت کاربر</p>
|
||||||
<p>{data?.data?.result?.limit}</p>
|
<p>{data?.data?.result?.limit ?? "بدون محدودیت کاربر"}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full h-full bg-gray-900/50 rounded-md shadow flex justify-between items-center p-3">
|
<div className="w-full h-full bg-gray-900/50 rounded-md shadow flex justify-between items-center p-3">
|
||||||
<p>مدت زمان</p>
|
<p>مدت زمان</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user