import { apiRequest } from "../../api/hooks/lib/ssr"

export const api = async <T>(
    endpoint: string,
    options?: ApiOptions,
    body?: any
): Promise<{ data: T; count: number } | any> => {
    let data = await apiRequest(endpoint, options, body)
    // @ts-ignore
    console.log(data, "data")
    return data
}
