Query Invalidation with trpc not working with React Server Components and App Router

Hi guys, I am trying to do Optimistic updates with trpc but the problem is I am fetching data on the server component using trpc and passing it to client component
const Dashboard = async () => {
  noStore();
  const session = await getServerAuthSession();

  if (!session) {
    redirect("/");
  }

  const dbWallets = await api.wallet.getAll();

  return (

and here is the revalidation code
 const { mutate, isPending } = api.wallet.create.useMutation({
    onSuccess: () => {
      toast("Wallet has been created");
      void utils.wallet.getAll.invalidate();
      setIsOpen(false);
      //revalidatePath("/dashboard");
    },
  });

Here I've tried with revalidatePath but that also does nothing
Please help!!
Was this page helpful?