i'm trying to have a component only render when I have used a search button.
The code below is my current code
Update
Made the changes, Now receiving this error.
error ] ERROR in /home/holborn/Documents/Work/Portfolio/Data_Scraping/Eldritch/client/pages/index.tsx(21,19): 21:19 Cannot find name 'Product'. 19 | interface OutputProps { 20 | searched?: string
21 | productList?: Product[] | ^ 22 | } 23 | 24 | const Output: React.FC = ({ searched, productList }) => {
This is the array for product list when the search is made
after following other question i get this error.
JSX element type 'void' is not a constructor function for JSX elements.
    262 | 
    263 |   return (
  > 264 |     <Output columns={columns} message={message} handleSearch={handleSearch} searchRef={searchRef} productList={productList}/>
        |     ^
    265 | 
    266 |   );
    267 | }