import React, { useState } from "react";import { api } from "../utils/api";const Test = () => { const searchSomething = api.surau.searhSomething; const [input, setInput] = useState<string>(""); const { data, isLoading } = searchSomething.useQuery({ name: input, }); return ( <div> <input type="text" onChange={(e) => setInput(e.target.value)} /> {isLoading ? ( <div>Loading...</div> ) : ( <div> {data?.map((item) => { return ( <div key={item.id}> <div>{item.name}</div> </div> ); })} </div> )} </div> );};export default Test;