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
---
 apps/web/components/dashboard/bookmarks/ManageListsModal.tsx | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'apps/web/components/dashboard/bookmarks/ManageListsModal.tsx')

diff --git a/apps/web/components/dashboard/bookmarks/ManageListsModal.tsx b/apps/web/components/dashboard/bookmarks/ManageListsModal.tsx
index 34d797a6..ee92dc5a 100644
--- a/apps/web/components/dashboard/bookmarks/ManageListsModal.tsx
+++ b/apps/web/components/dashboard/bookmarks/ManageListsModal.tsx
@@ -19,8 +19,9 @@ import {
 import { toast } from "@/components/ui/sonner";
 import LoadingSpinner from "@/components/ui/spinner";
 import { useTranslation } from "@/lib/i18n/client";
-import { api } from "@/lib/trpc";
+import { useTRPC } from "@/lib/trpc";
 import { zodResolver } from "@hookform/resolvers/zod";
+import { useQuery } from "@tanstack/react-query";
 import { Archive, X } from "lucide-react";
 import { useForm } from "react-hook-form";
 import { z } from "zod";
@@ -43,6 +44,7 @@ export default function ManageListsModal({
   open: boolean;
   setOpen: (open: boolean) => void;
 }) {
+  const api = useTRPC();
   const { t } = useTranslation();
   const formSchema = z.object({
     listId: z.string({
@@ -61,13 +63,14 @@ export default function ManageListsModal({
     { enabled: open },
   );
 
-  const { data: alreadyInList, isPending: isAlreadyInListPending } =
-    api.lists.getListsOfBookmark.useQuery(
+  const { data: alreadyInList, isPending: isAlreadyInListPending } = useQuery(
+    api.lists.getListsOfBookmark.queryOptions(
       {
         bookmarkId,
       },
       { enabled: open },
-    );
+    ),
+  );
 
   const isLoading = isAllListsPending || isAlreadyInListPending;
 
-- 
cgit v1.2.3-70-g09d2

