From 7c04276bacf6e9ecc0cce4a2ece7a25dc8e5deaa Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Tue, 20 Feb 2024 14:05:53 +0000
Subject: ui: hydrate the react query cache in the client side components

---
 packages/web/lib/providers.tsx | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'packages/web/lib/providers.tsx')

diff --git a/packages/web/lib/providers.tsx b/packages/web/lib/providers.tsx
index e81645dd..d14d4d96 100644
--- a/packages/web/lib/providers.tsx
+++ b/packages/web/lib/providers.tsx
@@ -5,6 +5,7 @@ import React, { useState } from "react";
 import { api } from "./trpc";
 import { loggerLink } from "@trpc/client";
 import { httpBatchLink } from "@trpc/client";
+import superjson from "superjson";
 
 export default function Providers({ children }: { children: React.ReactNode }) {
   const [queryClient] = React.useState(() => new QueryClient());
@@ -20,6 +21,7 @@ export default function Providers({ children }: { children: React.ReactNode }) {
         httpBatchLink({
           // TODO: Change this to be a full URL exposed as a client side setting
           url: `/api/trpc`,
+          transformer: superjson,
         }),
       ],
     }),
-- 
cgit v1.2.3-70-g09d2

