request list + structure

This commit is contained in:
hamid zarghami
2025-10-20 12:28:48 +03:30
commit dbe37e371e
89 changed files with 9547 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import { useQuery } from "@tanstack/react-query";
import axios from "@/config/axios";
export interface WalletBalanceData {
balance: number;
}
export const useGetWalletBalance = () => {
return useQuery({
queryKey: ["wallet-balance"],
queryFn: async (): Promise<{ data: WalletBalanceData }> => {
const response = await axios.get("/wallet/balance");
return response.data;
},
});
};