feat : formating code by prettier

This commit is contained in:
alij
2024-07-03 14:56:29 +03:30
parent 790ed79605
commit efa148c7ac
19 changed files with 289 additions and 84 deletions

View File

@@ -44,7 +44,7 @@ const Profile = () => {
});
useEffect(() => {
const trackId = query.get("trackId");
if (trackId) {
toast.promise(mutation.mutateAsync({ trackId }), {
loading: "درحال تایید درگاه پرداخت...",
@@ -68,12 +68,12 @@ const Profile = () => {
}
}, []);
const {data,isLoading,isFetching,error} = useQuery({
queryKey:["profile",mutation],
queryFn:()=>{
return axios.get('/profile');
}
})
const { data, isLoading, isFetching, error } = useQuery({
queryKey: ["profile", mutation],
queryFn: () => {
return axios.get("/profile");
},
});
return (
<>
{!mutation.isPending && (
@@ -85,8 +85,19 @@ const Profile = () => {
/>
)}
<div className="relative h-full w-full flex flex-col gap-4">
<ProfileDetails data={data?.data} isLoading={isLoading} isFetching={isFetching} error={error} userTitle=""/>
<ProductConfigList data={data?.data} userTitle={data?.data?.result?.user_profile?.name} isLoading={isLoading} isFetching={isFetching} error={error} />
<ProfileDetails
data={data?.data}
isLoading={isLoading}
isFetching={isFetching}
error={error}
/>
<ProductConfigList
data={data?.data}
userTitle={data?.data?.result?.user_profile?.name}
isLoading={isLoading}
isFetching={isFetching}
error={error}
/>
</div>
</>
);