|
|
|
@ -13,10 +13,13 @@ export const Header = ({ |
|
|
|
|
filterOptions, |
|
|
|
|
levels, |
|
|
|
|
productTypes, |
|
|
|
|
isDark |
|
|
|
|
isDark, |
|
|
|
|
}) => { |
|
|
|
|
return ( |
|
|
|
|
<header className="w-full px-4 fixed top-0 left-0 pb-5 z-10" style={{backgroundColor: isDark ? '#061B30' : 'white'}}> |
|
|
|
|
<header |
|
|
|
|
className="w-full px-4 fixed top-0 left-0 pb-5 z-10" |
|
|
|
|
style={{ backgroundColor: isDark ? "#061B30" : "white" }} |
|
|
|
|
> |
|
|
|
|
<Search |
|
|
|
|
backgroundColor="bg-gray-100" |
|
|
|
|
borderColor="border-grayDB dark:border-gray45" |
|
|
|
@ -34,7 +37,9 @@ export const Header = ({ |
|
|
|
|
borderColor="border-grayDB dark:border-gray45" |
|
|
|
|
backgroundColor="bg-gray-100" |
|
|
|
|
onChange={(name, value) => |
|
|
|
|
setFilterOptions({ ...filterOptions, [name]: value }) |
|
|
|
|
value === "نوع محصول" |
|
|
|
|
? setFilterOptions({ ...filterOptions, [name]: null }) |
|
|
|
|
: setFilterOptions({ ...filterOptions, [name]: value }) |
|
|
|
|
} |
|
|
|
|
name="productType" |
|
|
|
|
options={productTypes} |
|
|
|
@ -45,7 +50,9 @@ export const Header = ({ |
|
|
|
|
borderColor="border-grayDB dark:border-gray45" |
|
|
|
|
backgroundColor="bg-gray-100" |
|
|
|
|
onChange={(name, value) => |
|
|
|
|
setFilterOptions({ ...filterOptions, [name]: value }) |
|
|
|
|
value === "پایه تحصیلی" |
|
|
|
|
? setFilterOptions({ ...filterOptions, [name]: null }) |
|
|
|
|
: setFilterOptions({ ...filterOptions, [name]: value }) |
|
|
|
|
} |
|
|
|
|
name="grade" |
|
|
|
|
options={Object.values(levels)} |
|
|
|
@ -59,7 +66,7 @@ const mapStateToProps = (state) => ({ |
|
|
|
|
levels: state.publicApi.grades, |
|
|
|
|
productTypes: state.book.productTypes, |
|
|
|
|
filterOptions: state.book.filterOptions, |
|
|
|
|
isDark: state.publicApi.isDark |
|
|
|
|
isDark: state.publicApi.isDark, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = { |
|
|
|
|