|
|
@ -13,10 +13,13 @@ export const Header = ({ |
|
|
|
filterOptions, |
|
|
|
filterOptions, |
|
|
|
levels, |
|
|
|
levels, |
|
|
|
productTypes, |
|
|
|
productTypes, |
|
|
|
isDark |
|
|
|
isDark, |
|
|
|
}) => { |
|
|
|
}) => { |
|
|
|
return ( |
|
|
|
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 |
|
|
|
<Search |
|
|
|
backgroundColor="bg-gray-100" |
|
|
|
backgroundColor="bg-gray-100" |
|
|
|
borderColor="border-grayDB dark:border-gray45" |
|
|
|
borderColor="border-grayDB dark:border-gray45" |
|
|
@ -34,7 +37,9 @@ export const Header = ({ |
|
|
|
borderColor="border-grayDB dark:border-gray45" |
|
|
|
borderColor="border-grayDB dark:border-gray45" |
|
|
|
backgroundColor="bg-gray-100" |
|
|
|
backgroundColor="bg-gray-100" |
|
|
|
onChange={(name, value) => |
|
|
|
onChange={(name, value) => |
|
|
|
setFilterOptions({ ...filterOptions, [name]: value }) |
|
|
|
value === "نوع محصول" |
|
|
|
|
|
|
|
? setFilterOptions({ ...filterOptions, [name]: null }) |
|
|
|
|
|
|
|
: setFilterOptions({ ...filterOptions, [name]: value }) |
|
|
|
} |
|
|
|
} |
|
|
|
name="productType" |
|
|
|
name="productType" |
|
|
|
options={productTypes} |
|
|
|
options={productTypes} |
|
|
@ -45,7 +50,9 @@ export const Header = ({ |
|
|
|
borderColor="border-grayDB dark:border-gray45" |
|
|
|
borderColor="border-grayDB dark:border-gray45" |
|
|
|
backgroundColor="bg-gray-100" |
|
|
|
backgroundColor="bg-gray-100" |
|
|
|
onChange={(name, value) => |
|
|
|
onChange={(name, value) => |
|
|
|
setFilterOptions({ ...filterOptions, [name]: value }) |
|
|
|
value === "پایه تحصیلی" |
|
|
|
|
|
|
|
? setFilterOptions({ ...filterOptions, [name]: null }) |
|
|
|
|
|
|
|
: setFilterOptions({ ...filterOptions, [name]: value }) |
|
|
|
} |
|
|
|
} |
|
|
|
name="grade" |
|
|
|
name="grade" |
|
|
|
options={Object.values(levels)} |
|
|
|
options={Object.values(levels)} |
|
|
@ -59,7 +66,7 @@ const mapStateToProps = (state) => ({ |
|
|
|
levels: state.publicApi.grades, |
|
|
|
levels: state.publicApi.grades, |
|
|
|
productTypes: state.book.productTypes, |
|
|
|
productTypes: state.book.productTypes, |
|
|
|
filterOptions: state.book.filterOptions, |
|
|
|
filterOptions: state.book.filterOptions, |
|
|
|
isDark: state.publicApi.isDark |
|
|
|
isDark: state.publicApi.isDark, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = { |
|
|
|
const mapDispatchToProps = { |
|
|
|