How to pass tRPC types?

What type could I use in this situation:
No description
2 Replies
sonor
sonor11mo ago
const SearchUsersModal = ({ adminUsers }: { adminUsers: UseTRPCQueryResult<inferRouterOutputs<AppRouter>["admin_users"]["list"], TRPCClientErrorLike<AppRouter>["data"]> }) => {
const [modalOpen, setModalOpen] = useState<boolean>(false);
};
const SearchUsersModal = ({ adminUsers }: { adminUsers: UseTRPCQueryResult<inferRouterOutputs<AppRouter>["admin_users"]["list"], TRPCClientErrorLike<AppRouter>["data"]> }) => {
const [modalOpen, setModalOpen] = useState<boolean>(false);
};
cant find the solution button lmao
George
George11mo ago
Use the RouterOutputs type So it would look like RouterOutputs[“admin_users”][“list”]
Want results from more Discord servers?
Add your server