From 65f6e83f11c82b0ec762e11f3392a80e614ee69a Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Sun, 1 Feb 2026 12:29:54 +0000
Subject: refactor: migrate trpc to the new react query integration mode
 (#2438)

* refactor: migrate trpc to the new react query integration mode

* more fixes

* more migrations

* upgrade trpc client
---
 .../dashboard/sidebar/InvitationNotificationBadge.tsx         | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'apps/web/components/dashboard/sidebar/InvitationNotificationBadge.tsx')

diff --git a/apps/web/components/dashboard/sidebar/InvitationNotificationBadge.tsx b/apps/web/components/dashboard/sidebar/InvitationNotificationBadge.tsx
index e4d7b39f..547b8a76 100644
--- a/apps/web/components/dashboard/sidebar/InvitationNotificationBadge.tsx
+++ b/apps/web/components/dashboard/sidebar/InvitationNotificationBadge.tsx
@@ -1,13 +1,14 @@
 "use client";
 
-import { api } from "@/lib/trpc";
+import { useTRPC } from "@/lib/trpc";
+import { useQuery } from "@tanstack/react-query";
 
 export function InvitationNotificationBadge() {
-  const { data: pendingInvitations } = api.lists.getPendingInvitations.useQuery(
-    undefined,
-    {
+  const api = useTRPC();
+  const { data: pendingInvitations } = useQuery(
+    api.lists.getPendingInvitations.queryOptions(undefined, {
       refetchInterval: 1000 * 60 * 5,
-    },
+    }),
   );
   const pendingInvitationsCount = pendingInvitations?.length ?? 0;
 
-- 
cgit v1.2.3-70-g09d2

