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("");
|
||||
setPassword("");
|
||||
}
|
||||
}, [textCopy , type]);
|
||||
}, [textCopy, type]);
|
||||
|
||||
const queryUpdateConfig = useQuery({
|
||||
queryKey: ["updateConfig", isOpenDropDown || isOpen],
|
||||
@@ -70,7 +70,7 @@ const ConfigItem = ({
|
||||
if (configId) {
|
||||
console.log("fethed");
|
||||
return axios.get(`/update-config/${configId}`);
|
||||
}else{
|
||||
} else {
|
||||
throw new Error("داده دریافتی یا پیدا نشده یا نامعتبر است")
|
||||
}
|
||||
},
|
||||
@@ -82,7 +82,7 @@ const ConfigItem = ({
|
||||
maxTraffic: queryUpdateConfig?.data?.data?.result?.max_traffic,
|
||||
traffic: queryUpdateConfig?.data?.data?.result?.traffic,
|
||||
});
|
||||
}, [queryUpdateConfig?.data, queryUpdateConfig.error , queryUpdateConfig.isFetching , queryUpdateConfig.isLoading]);
|
||||
}, [queryUpdateConfig?.data, queryUpdateConfig.error, queryUpdateConfig.isFetching, queryUpdateConfig.isLoading]);
|
||||
return (
|
||||
<>
|
||||
<ModalConfigDetails
|
||||
@@ -121,8 +121,7 @@ const ConfigItem = ({
|
||||
</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 ${
|
||||
isDisabled ? "filter blur-sm" : ""
|
||||
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" : ""
|
||||
}`}
|
||||
>
|
||||
<p className="max-md:hidden">تاریخ خرید : {dateBuy}</p>
|
||||
@@ -209,13 +208,13 @@ const ConfigItem = ({
|
||||
</div>
|
||||
<div className="max-[400px]:w-full md:hidden flex flex-row-reverse gap-2 justify-end items-center">
|
||||
<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={() => {
|
||||
setConfigId(id);
|
||||
setIsOpen(true);
|
||||
}}
|
||||
>
|
||||
مشاهده جزئیات
|
||||
مشاهده مشخصات سرویس
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user