import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { trpc } from "@/lib/trpc"; import { Sparkles, Zap } from "lucide-react"; import { DemoCard, InlineSpinner, CodePreview } from "@/components/demo"; export function HelloExample() { const [name, setName] = useState(""); const { data, isLoading, refetch } = trpc.hello.useQuery( { name: name || undefined }, { enabled: false } ); return (
setName(e.target.value)} placeholder="Enter your name..." className="flex-1" />
{data && }
); }