Search.js 561 B

123456789101112131415161718
  1. import { useState } from "react"
  2. import { Link } from "react-router-dom"
  3. import { actionSearch } from "../actions"
  4. import loop from '../images/search.svg'
  5. const Search = ({}) => {
  6. const [search,setSearch] = useState('')
  7. return (
  8. <div class="d1">
  9. <form>
  10. <input type="text" value={search} onChange={e => setSearch(e.target.value)} placeholder="Искать здесь" />
  11. <Link to='/search/' className='search'><img src={loop} /></Link>
  12. </form>
  13. </div>
  14. )
  15. }
  16. export default Search