From 1d49b7bc64b358f4432d6e5c7fc38600894d4365 Mon Sep 17 00:00:00 2001 From: G Date: Tue, 7 May 2024 18:00:22 +0000 Subject: [PATCH] a short test of the endpoint --- src/contexts/UserAuthenticationContext.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/contexts/UserAuthenticationContext.tsx b/src/contexts/UserAuthenticationContext.tsx index 0add797..ba4f6eb 100644 --- a/src/contexts/UserAuthenticationContext.tsx +++ b/src/contexts/UserAuthenticationContext.tsx @@ -1,3 +1,5 @@ +import getPaymentTypes from "@/utils/requests/getPaymentTypes"; +import { useQuery } from "@tanstack/react-query"; import { createContext, useContext, useState } from "react"; import type { IauthenticationData } from "./Types"; export interface UserAuthenticationContextProps { @@ -19,6 +21,16 @@ export const UserAuthenticationContextProvider = ({ children }: { children: Reac refresh: "", }); + const { data, isLoading, error } = useQuery({ + queryKey: ["paymentTypes"], + queryFn: getPaymentTypes, + enabled: true, + }); + + console.log("data", data); + console.log("isLoading", isLoading); + console.log("error", error); + return (