fix(ConfigItem.tsx): improve code formatting and update button label for service details
This commit is contained in:
@@ -62,7 +62,7 @@ const ConfigItem = ({
|
|||||||
setUsername("");
|
setUsername("");
|
||||||
setPassword("");
|
setPassword("");
|
||||||
}
|
}
|
||||||
}, [textCopy , type]);
|
}, [textCopy, type]);
|
||||||
|
|
||||||
const queryUpdateConfig = useQuery({
|
const queryUpdateConfig = useQuery({
|
||||||
queryKey: ["updateConfig", isOpenDropDown || isOpen],
|
queryKey: ["updateConfig", isOpenDropDown || isOpen],
|
||||||
@@ -70,7 +70,7 @@ const ConfigItem = ({
|
|||||||
if (configId) {
|
if (configId) {
|
||||||
console.log("fethed");
|
console.log("fethed");
|
||||||
return axios.get(`/update-config/${configId}`);
|
return axios.get(`/update-config/${configId}`);
|
||||||
}else{
|
} else {
|
||||||
throw new Error("داده دریافتی یا پیدا نشده یا نامعتبر است")
|
throw new Error("داده دریافتی یا پیدا نشده یا نامعتبر است")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -82,7 +82,7 @@ const ConfigItem = ({
|
|||||||
maxTraffic: queryUpdateConfig?.data?.data?.result?.max_traffic,
|
maxTraffic: queryUpdateConfig?.data?.data?.result?.max_traffic,
|
||||||
traffic: queryUpdateConfig?.data?.data?.result?.traffic,
|
traffic: queryUpdateConfig?.data?.data?.result?.traffic,
|
||||||
});
|
});
|
||||||
}, [queryUpdateConfig?.data, queryUpdateConfig.error , queryUpdateConfig.isFetching , queryUpdateConfig.isLoading]);
|
}, [queryUpdateConfig?.data, queryUpdateConfig.error, queryUpdateConfig.isFetching, queryUpdateConfig.isLoading]);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ModalConfigDetails
|
<ModalConfigDetails
|
||||||
@@ -121,8 +121,7 @@ const ConfigItem = ({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div
|
<div
|
||||||
className={`w-full h-full p-3 rounded-md text-xs md:text-base gap-2 flex justify-between items-center flex-wrap text-secondTheme bg-gray-900 shadow-md shadow-gray-900 ${
|
className={`w-full h-full p-3 rounded-md text-xs md:text-base gap-2 flex justify-between items-center flex-wrap text-secondTheme bg-gray-900 shadow-md shadow-gray-900 ${isDisabled ? "filter blur-sm" : ""
|
||||||
isDisabled ? "filter blur-sm" : ""
|
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<p className="max-md:hidden">تاریخ خرید : {dateBuy}</p>
|
<p className="max-md:hidden">تاریخ خرید : {dateBuy}</p>
|
||||||
@@ -209,13 +208,13 @@ const ConfigItem = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className="max-[400px]:w-full md:hidden flex flex-row-reverse gap-2 justify-end items-center">
|
<div className="max-[400px]:w-full md:hidden flex flex-row-reverse gap-2 justify-end items-center">
|
||||||
<Button
|
<Button
|
||||||
extra="!m-0 !px-2 max-[400px]:w-full !py-1 shadow-md !font-bold !text-black"
|
extra="!m-0 !px-2 max-[400px]:w-full !py-1 shadow-md !font-bold !text-black text-lg"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setConfigId(id);
|
setConfigId(id);
|
||||||
setIsOpen(true);
|
setIsOpen(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
مشاهده جزئیات
|
مشاهده مشخصات سرویس
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user