change price: echo (Not completed yet, but)

This commit is contained in:
hamid zarghami
2025-10-06 14:31:35 +03:30
parent 5aaf0aa6bd
commit 7b3a5d9a12
5 changed files with 132 additions and 7 deletions
+6
View File
@@ -52,3 +52,9 @@ export const useGetComments = () => {
queryFn: api.getComments,
});
};
export const useChangeEmail = () => {
return useMutation({
mutationFn: (email: string) => api.changeEmail(email),
});
};
+5
View File
@@ -43,3 +43,8 @@ export const getComments = async (): Promise<CommentsResponse> => {
const { data } = await axios.get("/user/profile/comments");
return data;
};
export const changeEmail = async (email: string) => {
const { data } = await axios.post("/user/profile/email/change", { email });
return data;
};