+ {/* Input */}
+
+
+ {/* Loader */}
+ {status === "fetching" &&
}
+
+ {/* Error message */}
+ {status === "error" && errorMessage && (
+
{errorMessage}
+ )}
+
+ {/* List of items */}
+ {status === "success" && (
+
+ {items.length ? (
+ items.map((item, index) => (
+ - handleItemClick(item)}>
+ {item}
+
+ ))
+ ) : (
+ No results
+ )}
+
+ )}
+
+ );
// Your code end here
};
export default Input;
-