the-forest/client/node_modules/.cache/babel-loader/4b8115718a76fee4a4aec7e9ccfc550fb9d8294c25139908dc6ffdc418ea4f8e.json

1 line
1.5 KiB
JSON
Raw Normal View History

2024-09-17 20:35:18 -04:00
{"ast":null,"code":"// src/usePrefetchQuery.tsx\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nfunction usePrefetchQuery(options, queryClient) {\n const client = useQueryClient(queryClient);\n if (!client.getQueryState(options.queryKey)) {\n client.prefetchQuery(options);\n }\n}\nexport { usePrefetchQuery };","map":{"version":3,"names":["useQueryClient","usePrefetchQuery","options","queryClient","client","getQueryState","queryKey","prefetchQuery"],"sources":["/Users/shoofle/Projects/the-forest/client/node_modules/@tanstack/react-query/src/usePrefetchQuery.tsx"],"sourcesContent":["import { useQueryClient } from './QueryClientProvider'\nimport type {\n DefaultError,\n FetchQueryOptions,\n QueryClient,\n QueryKey,\n} from '@tanstack/query-core'\n\nexport function usePrefetchQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n queryClient?: QueryClient,\n) {\n const client = useQueryClient(queryClient)\n\n if (!client.getQueryState(options.queryKey)) {\n client.prefetchQuery(options)\n }\n}\n"],"mappings":";AAAA,SAASA,cAAA,QAAsB;AAQxB,SAASC,iBAMdC,OAAA,EACAC,WAAA,EACA;EACA,MAAMC,MAAA,GAASJ,cAAA,CAAeG,WAAW;EAEzC,IAAI,CAACC,MAAA,CAAOC,aAAA,CAAcH,OAAA,CAAQI,QAAQ,GAAG;IAC3CF,MAAA,CAAOG,aAAA,CAAcL,OAAO;EAC9B;AACF","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}