Network request was successful, variable was not populated
I'm fetching the data, json is being returned, but trying to use this data is impossible


const t = initTRPC.context<Context>().create({
transformer: superjson,
errorFormatter({ shape, error }) {
return {
...shape,
data: {
...shape.data,
zodError:
error.cause instanceof ZodError ? error.cause.flatten() : null,
},
};
},
});const t = initTRPC.context<Context>().create({
transformer: superjson,
errorFormatter({ shape, error }) {
return {
...shape,
data: {
...shape.data,
zodError:
error.cause instanceof ZodError ? error.cause.flatten() : null,
},
};
},
});"use client";
import { useTRPC } from "@/utils/trpc";
import { useQuery } from "@tanstack/react-query";
export default function Test() {
const trpc = useTRPC();
const response = useQuery(trpc.server.getServers.queryOptions());
return <div>{JSON.stringify(response.data)}</div>;
}