|
|
|
@ -3,7 +3,9 @@ import { connect } from "react-redux"; |
|
|
|
|
import _ from "lodash"; |
|
|
|
|
import { book } from "../../redux/actions"; |
|
|
|
|
import search from "../../assets/icons/search.png"; |
|
|
|
|
import searchBlack from "../../assets/icons/searchBlack.png"; |
|
|
|
|
import voice from "../../assets/icons/voice.png"; |
|
|
|
|
import voiceBlack from "../../assets/icons/voice-black.png"; |
|
|
|
|
|
|
|
|
|
function HomeSearchBox({ |
|
|
|
|
lastItems, |
|
|
|
@ -22,14 +24,14 @@ function HomeSearchBox({ |
|
|
|
|
const submitSort = (value: any) => { |
|
|
|
|
sortFilter({ search: inputValue, sort: value }); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const light = theme === "light"; |
|
|
|
|
return ( |
|
|
|
|
<section |
|
|
|
|
className={_.join( |
|
|
|
|
[ |
|
|
|
|
"home-search-box d-flex flex-column align-items-center", |
|
|
|
|
theme === "light" |
|
|
|
|
? "home-search-box-light" |
|
|
|
|
: "home-search-box-dark", |
|
|
|
|
theme === "light" ? "home-search-box-light" : "home-search-box-dark", |
|
|
|
|
], |
|
|
|
|
" " |
|
|
|
|
)} |
|
|
|
@ -47,19 +49,31 @@ function HomeSearchBox({ |
|
|
|
|
> |
|
|
|
|
<img src={search} alt="" /> |
|
|
|
|
</button> |
|
|
|
|
|
|
|
|
|
{light ? ( |
|
|
|
|
<img |
|
|
|
|
className="mobile home-search-box__searchIcon" |
|
|
|
|
src={searchBlack} |
|
|
|
|
onClick={() => |
|
|
|
|
sortFilter({ search: inputValue, sort: selectedSort }) |
|
|
|
|
} |
|
|
|
|
alt="" |
|
|
|
|
/> |
|
|
|
|
) : ( |
|
|
|
|
<img |
|
|
|
|
className="mobile home-search-box__searchIcon" |
|
|
|
|
src={search} |
|
|
|
|
onClick={() => sortFilter({ search: inputValue, sort: selectedSort })} |
|
|
|
|
onClick={() => |
|
|
|
|
sortFilter({ search: inputValue, sort: selectedSort }) |
|
|
|
|
} |
|
|
|
|
alt="" |
|
|
|
|
/> |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
<button |
|
|
|
|
className="home-search-box__voice" |
|
|
|
|
onClick={() => setVocal(true)} |
|
|
|
|
> |
|
|
|
|
<img src={voice} alt="" /> |
|
|
|
|
{light ? <img src={voiceBlack} alt="" /> : <img src={voice} alt="" />} |
|
|
|
|
</button> |
|
|
|
|
</form> |
|
|
|
|
<footer className="desktop"> |
|
|
|
|