Commit 1d49b7bc by G

a short test of the endpoint

parent 4a4f14e8
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 (
<UserAuthenticationContext.Provider
value={{ isAuthenticated: isAuthenticated, setIsAuthenticated, setAuthenticationData }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment