"use client"; import Link from "next/link"; import { useState } from "react"; const PageCountInput = ({authors, hiveID, title, url }) => { const [value, setValue] = useState(0); const handleSubmit = async () => { try { const response = await fetch("/api/books/pageCount", { body: JSON.stringify({ authors, hiveID, title, value }), method: "POST" }); if (response) { window.location.reload(); } } catch (error) {} }; return (
setValue(Number(e.currentTarget.value))} placeholder="Add Page Count" step={1} type="number" value={value} /> Goodreads Search Results
); }; export default PageCountInput;