-
Welcome Back
+ return (
+
+
Welcome Back
-
- {(state) => (
-
- )}
-
-
+
+ {(state) => (
+
+ )}
+
+
-
-
-
-
- );
+
+
+
+
+ );
}
diff --git a/apps/cli/template/with-auth/packages/client/src/main.tsx b/apps/cli/template/with-auth/packages/client/src/main.tsx
index 904f39a..8bbe645 100644
--- a/apps/cli/template/with-auth/packages/client/src/main.tsx
+++ b/apps/cli/template/with-auth/packages/client/src/main.tsx
@@ -1,7 +1,7 @@
import {
- QueryCache,
- QueryClient,
- QueryClientProvider,
+ QueryCache,
+ QueryClient,
+ QueryClientProvider,
} from "@tanstack/react-query";
import { RouterProvider, createRouter } from "@tanstack/react-router";
import { httpBatchLink } from "@trpc/client";
@@ -13,65 +13,66 @@ import { routeTree } from "./routeTree.gen";
import { trpc } from "./utils/trpc";
const queryClient = new QueryClient({
- queryCache: new QueryCache({
- onError: (error) => {
- toast.error(error.message, {
- action: {
- label: "retry",
- onClick: () => {
- queryClient.invalidateQueries();
- },
- },
- });
- },
- }),
+ queryCache: new QueryCache({
+ onError: (error) => {
+ toast.error(error.message, {
+ action: {
+ label: "retry",
+ onClick: () => {
+ queryClient.invalidateQueries();
+ },
+ },
+ });
+ },
+ }),
});
const trpcClient = trpc.createClient({
- links: [
- httpBatchLink({
- url: `${import.meta.env.VITE_SERVER_URL}/trpc`,
- fetch(url, options) {
- return fetch(url, {
- ...options,
- credentials: "include",
- });
- },
- }),
- ],
+ links: [
+ httpBatchLink({
+ url: `${import.meta.env.VITE_SERVER_URL}/trpc`,
+ fetch(url, options) {
+ return fetch(url, {
+ ...options,
+ credentials: "include",
+ });
+ },
+ }),
+ ],
});
export const trpcQueryUtils = createTRPCQueryUtils({
- queryClient,
- client: trpcClient,
+ queryClient,
+ client: trpcClient,
});
const router = createRouter({
- routeTree,
- defaultPreload: "intent",
- context: { trpcQueryUtils },
- defaultPendingComponent: () =>