diff --git a/waspc/data/Generator/templates/react-app/src/queryClient.js b/waspc/data/Generator/templates/react-app/src/queryClient.js deleted file mode 100644 index f6ecda3124..0000000000 --- a/waspc/data/Generator/templates/react-app/src/queryClient.js +++ /dev/null @@ -1,23 +0,0 @@ -import { QueryClient } from '@tanstack/react-query' - -const defaultQueryClientConfig = {} - -let queryClientConfig, resolveQueryClientInitialized, isQueryClientInitialized - -export const queryClientInitialized = new Promise(resolve => { - resolveQueryClientInitialized = resolve -}); - -export function configureQueryClient(config) { - if (isQueryClientInitialized) { - throw new Error("Attempted to configure the QueryClient after initialization") - } - - queryClientConfig = config -} - -export function initializeQueryClient() { - const queryClient = new QueryClient(queryClientConfig ?? defaultQueryClientConfig) - isQueryClientInitialized = true; - resolveQueryClientInitialized(queryClient) -} diff --git a/waspc/src/Wasp/Generator/WebAppGenerator.hs b/waspc/src/Wasp/Generator/WebAppGenerator.hs index 5e964bf6d0..18a24ef058 100644 --- a/waspc/src/Wasp/Generator/WebAppGenerator.hs +++ b/waspc/src/Wasp/Generator/WebAppGenerator.hs @@ -197,7 +197,6 @@ genSrcDir :: AppSpec -> Generator [FileDraft] genSrcDir spec = sequence [ genFileCopy [relfile|logo.png|], - genFileCopy [relfile|queryClient.js|], genFileCopy [relfile|utils.js|], genFileCopy [relfile|vite-env.d.ts|], getIndexTs spec