| Línea 1... |
Línea 1... |
| 1 |
import React, { useState, useRef, useEffect } from "react";
|
1 |
import React, { useState, useRef, useEffect } from "react";
|
| 2 |
import { axios, jsonToParams } from "../../utils";
|
2 |
import { axios, jsonToParams } from "../../utils";
|
| 3 |
import { Col, Container, Row } from "react-bootstrap";
|
3 |
import { Col, Container, Row } from "react-bootstrap";
|
| 4 |
import { useHistory, useLocation } from "react-router-dom";
|
4 |
import { useHistory, useLocation } from "react-router-dom";
|
| - |
|
5 |
import styled from "styled-components";
|
| - |
|
6 |
import SearchIcon from "@mui/icons-material/Search";
|
| Línea 5... |
Línea 7... |
| 5 |
|
7 |
|
| 6 |
import Spinner from "../../components/UI/Spinner";
|
8 |
import Spinner from "../../components/UI/Spinner";
|
| 7 |
import SearchItem from "../../components/search/SearchItem";
|
9 |
import SearchItem from "../../components/search/SearchItem";
|
| 8 |
import Input from "../../components/UI/Input";
|
10 |
import Input from "../../components/UI/Input";
|
| 9 |
import EmptySection from "../../components/UI/EmptySection";
|
11 |
import EmptySection from "../../components/UI/EmptySection";
|
| 10 |
import PaginationComponent from "../../components/UI/PaginationComponent";
|
12 |
import PaginationComponent from "../../components/UI/PaginationComponent";
|
| 11 |
import FiltersSidebar from "../../components/search/FiltersSidebar";
|
13 |
import FiltersSidebar from "../../components/search/FiltersSidebar";
|
| 12 |
import CategoryFilter from "../../components/search/CategoryFilter";
|
14 |
import CategoryFilter from "../../components/search/CategoryFilter";
|
| Línea -... |
Línea 15... |
| - |
|
15 |
import LocationFilter from "../../components/search/LocationFilter";
|
| - |
|
16 |
|
| - |
|
17 |
const StyledSearch = styled(Input)`
|
| - |
|
18 |
background-color: var(--bg-color);
|
| 13 |
import LocationFilter from "../../components/search/LocationFilter";
|
19 |
`;
|
| 14 |
|
20 |
|
| 15 |
const SearchPage = () => {
|
21 |
const SearchPage = () => {
|
| 16 |
const [entities, setEntities] = useState([]);
|
22 |
const [entities, setEntities] = useState([]);
|
| 17 |
const [loading, setLoading] = useState(true);
|
23 |
const [loading, setLoading] = useState(true);
|
| Línea 159... |
Línea 165... |
| 159 |
}, [keyword, category, currentPage]);
|
165 |
}, [keyword, category, currentPage]);
|
| Línea 160... |
Línea 166... |
| 160 |
|
166 |
|
| 161 |
return (
|
167 |
return (
|
| 162 |
<>
|
168 |
<>
|
| 163 |
<Container as="main">
|
169 |
<Container as="main">
|
| - |
|
170 |
<StyledSearch
|
| 164 |
<Input
|
171 |
icon={SearchIcon}
|
| 165 |
onKeyDown={onSearch}
|
172 |
onKeyDown={onSearch}
|
| 166 |
onChange={(e) => setEntity(e.target.value)}
|
173 |
onChange={(e) => setEntity(e.target.value)}
|
| 167 |
value={entity}
|
174 |
value={entity}
|
| 168 |
/>
|
175 |
/>
|