How to create a reusable Error and loading component - tRPC