'use client'; import { CheckCircle2, AlertCircle, Loader2 } from 'lucide-react'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@repo/ui'; import { trpc } from '@/lib/trpc/client'; /** * Client-side ping. Demonstrates the second tRPC path: client hooks + * TanStack Query. The RSC caller above the fold and this hook hit the same * procedure — both must succeed for the hybrid wiring to be considered green. */ export function PingClient() { const query = trpc.ping.ping.useQuery(); return ( {query.isPending ? ( ) : query.isError ? ( ) : ( )} Client-side ping (useQuery) Round-trips through /api/trpc. {query.isPending && Loading…} {query.isError && ( {query.error.message} )} {query.data && ( tenant: {query.data.tenant.name} )} ); }