diff --git a/src/pages/profile/index.tsx b/src/pages/profile/index.tsx index e8a87df..5c64bd8 100644 --- a/src/pages/profile/index.tsx +++ b/src/pages/profile/index.tsx @@ -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 = () => { /> )}