@ -1,9 +1,8 @@
import React , { useEffect , useState } from "react" ;
import React , { useEffect , useState } from "react" ;
import Class from "../../components/products/classes" ;
import { book , publicApi , userProduct } from "../../redux/actions" ;
import { book , publicApi , userProduct } from "../../redux/actions" ;
import { connect } from 'react-redux' ;
import { connect } from "react-redux" ;
import { Link } from "react-router-dom" ;
import { Link } from "react-router-dom" ;
import Product from '../../components/Product' ;
import Product from "../../components/Product" ;
import img1 from "../../assets/img/Group 1344.svg" ;
import img1 from "../../assets/img/Group 1344.svg" ;
import img2 from "../../assets/img/Group 1345.svg" ;
import img2 from "../../assets/img/Group 1345.svg" ;
@ -16,97 +15,117 @@ import ServicePopUp from "./service";
import Games from "../dashboard2/Games" ;
import Games from "../dashboard2/Games" ;
import Packages from "../dashboard2/Packages" ;
import Packages from "../dashboard2/Packages" ;
const Services = ( { isMobile ,
const Services = ( {
books ,
isMobile ,
getList ,
books ,
grades ,
getList ,
gradeFilter ,
grades ,
selectedGrade ,
gradeFilter ,
gradeFilterBooks ,
selectedGrade ,
setHeaderOptions ,
gradeFilterBooks ,
headerOptions ,
setHeaderOptions ,
videos ,
headerOptions ,
pushToCart
videos ,
pushToCart ,
} ) => {
} ) => {
const [ checked , setChecked ] = useState ( [ false , false , false , false , false , false ] ) ;
const [ checked , setChecked ] = useState ( [
const [ filterCheck , setFilterCheck ] = useState ( [ false , false , false , false ] ) ;
false ,
const [ filter , setFilter ] = useState ( {
false ,
search : "" ,
false ,
grade : "" ,
false ,
productsType : "کتاب" ,
false ,
} ) ;
false ,
] ) ;
const [ popup , setPopUp ] = useState ( false )
const [ filterCheck , setFilterCheck ] = useState ( [ false , false , false , false ] ) ;
const [ popUpContent , setPopUpContent ] = useState ( {
const [ filter , setFilter ] = useState ( {
title : '' ,
search : "" ,
video : '' ,
grade : "" ,
description : '' ,
productsType : "کتاب" ,
price : '' ,
} ) ;
teacher : '' ,
classHour : '' ,
const [ popup , setPopUp ] = useState ( false ) ;
classMinute : ''
const [ popUpContent , setPopUpContent ] = useState ( {
title : "" ,
} )
video : "" ,
description : "" ,
const onChange = ( name , value ) => {
price : "" ,
setFilter ( { ... filter , [ name ] : value } ) ;
teacher : "" ,
} ;
classHour : "" ,
classMinute : "" ,
useEffect ( ( ) => {
} ) ;
getList ( ) ;
setHeaderOptions ( headerOptions ) ;
const onChange = ( name , value ) => {
} , [ ] ) ;
setFilter ( { ... filter , [ name ] : value } ) ;
} ;
useEffect ( ( ) => {
gradeFilter ( filter . grade ) ;
useEffect ( ( ) => {
} , [ filter ] ) ;
getList ( ) ;
setHeaderOptions ( headerOptions ) ;
const services = [
} , [ ] ) ;
{
title : 'کلاس های آموزشی' ,
useEffect ( ( ) => {
image : img1 ,
gradeFilter ( filter . grade ) ;
role : ''
} , [ filter ] ) ;
} ,
{
const services = [
title : 'پیش ثبت نام مدارس' ,
{
image : img2 ,
title : "کلاس های آموزشی" ,
role : ''
image : img1 ,
} ,
role : "" ,
{
} ,
title : 'بسته های آزمون' ,
{
image : img3 ,
title : "پیش ثبت نام مدارس" ,
role : ''
image : img2 ,
} ,
role : "" ,
{
} ,
title : 'کتاب های آموزشی' ,
{
image : img4 ,
title : "بسته های آزمون" ,
role : ''
image : img3 ,
} ,
role : "" ,
{
} ,
title : 'دوره های مجازی' ,
{
image : img5 ,
title : "کتاب های آموزشی" ,
role : ''
image : img4 ,
} ,
role : "" ,
{
} ,
title : 'سایر خدمات' ,
{
image : img6 ,
title : "دوره های مجازی" ,
role : ''
image : img5 ,
} ,
role : "" ,
] ;
} ,
{
const [ selectedGames , setSelectedGames ] = useState ( [ ] ) ;
title : "سایر خدمات" ,
const [ gameId , setGameId ] = useState ( 1 ) ;
image : img6 ,
const chooseGame = ( id ) => {
role : "" ,
setGameId ( id ) ;
} ,
} ;
] ;
return (
const [ selectedGames , setSelectedGames ] = useState ( [ ] ) ;
< div className = "flex items-start justify-between" style = { { width : '93.5%' , direction : 'rtl' } } >
const [ gameId , setGameId ] = useState ( 1 ) ;
{ popup ? < ServicePopUp content = { popUpContent } closeOnClick = { ( ) => setPopUp ( false ) } / > : null }
const chooseGame = ( id ) => {
< div className = "w-3/4 flex flex-col justify-center " style = { { marginTop : '5.5%' } } >
setGameId ( id ) ;
} ;
< div className = "relative h-48 w-full border-b border-red82OP px-10" style = { { direction : 'ltr' } } >
{ / * {
return (
< div
className = "flex items-start justify-between"
style = { { width : "93.5%" , direction : "rtl" } }
>
{ popup ? (
< ServicePopUp
content = { popUpContent }
closeOnClick = { ( ) => setPopUp ( false ) }
/ >
) : null }
< div
className = "w-3/4 flex flex-col justify-center "
style = { { marginTop : "5.5%" } }
>
< div
className = "relative h-48 w-full border-b border-red82OP px-10"
style = { { direction : "ltr" } }
>
{ / * {
services . map ( ( item , index ) => (
services . map ( ( item , index ) => (
< div
< div
className = "flex flex-col justify-center items-center transition-all duration-200 m-4 rounded-xl border-2 border-red82OP hover:cursor-pointer hover:bg-pinkF5"
className = "flex flex-col justify-center items-center transition-all duration-200 m-4 rounded-xl border-2 border-red82OP hover:cursor-pointer hover:bg-pinkF5"
@ -135,182 +154,284 @@ const Services = ({ isMobile,
< / d i v >
< / d i v >
) )
) )
} * / }
} * / }
< Games
< Games
selectedGames = { selectedGames }
selectedGames = { selectedGames }
gameId = { gameId }
gameId = { gameId }
chooseGame = { chooseGame }
chooseGame = { chooseGame }
/ >
< / d i v >
{ /* filters */ }
< div className = "flex mx-2 my-4 justify-center" >
< div className = "flex items-center " >
< svg
xmlns = "http://www.w3.org/2000/svg"
width = "40"
height = "40"
viewBox = "0 0 14.378 14.378"
>
< g
id = "vuesax_linear_filter-tick"
data - name = "vuesax/linear/filter-tick"
transform = "translate(-620 -700)"
>
< g id = "filter-tick" transform = "translate(620 700)" >
< path
id = "Vector"
d = "M5.691,2.846a2.8,2.8,0,0,1-.407,1.468A2.836,2.836,0,0,1,2.846,5.691,2.768,2.768,0,0,1,1.312,5.23a2.685,2.685,0,0,1-.9-.917A2.807,2.807,0,0,1,0,2.846,2.848,2.848,0,0,1,2.846,0a2.648,2.648,0,0,1,.623.072A2.84,2.84,0,0,1,5.691,2.846Z"
transform = "translate(7.267 5.991)"
fill = "none"
stroke = "#696969"
stroke - linecap = "round"
stroke - linejoin = "round"
stroke - width = "0.6"
/ >
< path
id = "Vector-2"
data - name = "Vector"
d = "M0,.7l.7.7L2.217,0"
transform = "translate(9.004 8.136)"
fill = "none"
stroke = "#696969"
stroke - linecap = "round"
stroke - linejoin = "round"
stroke - width = "0.6"
/ >
< path
id = "Vector-3"
data - name = "Vector"
d = "M0,0H14.378V14.378H0Z"
transform = "translate(14.378 14.378) rotate(180)"
fill = "none"
opacity = "0"
/ >
< g id = "Group" transform = "translate(1.983 1.198)" >
< path
id = "Vector-4"
data - name = "Vector"
d = "M10.412,1.21V2.54a2.292,2.292,0,0,1-.605,1.4l-1.054.929a2.648,2.648,0,0,0-.623-.072A2.848,2.848,0,0,0,5.284,7.638,2.807,2.807,0,0,0,5.7,9.106a2.685,2.685,0,0,0,.9.917v.2a1.336,1.336,0,0,1-.545,1.03l-.845.545a1.233,1.233,0,0,1-1.875-1.03V7.567A2.342,2.342,0,0,0,2.846,6.3l-2.3-2.42A2.041,2.041,0,0,1,0,2.666V1.27A1.229,1.229,0,0,1,1.21,0H9.2A1.215,1.215,0,0,1,10.412,1.21Z"
fill = "none"
stroke = "#696969"
stroke - linecap = "round"
stroke - linejoin = "round"
stroke - width = "0.6"
/ >
/ >
< / d i v >
< / g >
{ /* filters */ }
< / g >
< div className = "flex mx-2 my-4 justify-center" >
< / g >
< div className = "flex items-center " >
< / s v g >
< svg xmlns = "http://www.w3.org/2000/svg" width = "40" height = "40" viewBox = "0 0 14.378 14.378" >
< / d i v >
< g id = "vuesax_linear_filter-tick" data - name = "vuesax/linear/filter-tick" transform = "translate(-620 -700)" >
< div className = "flex items-center mx-4 pl-6 border-l-2 border-gray-300" >
< g id = "filter-tick" transform = "translate(620 700)" >
< div
< path id = "Vector" d = "M5.691,2.846a2.8,2.8,0,0,1-.407,1.468A2.836,2.836,0,0,1,2.846,5.691,2.768,2.768,0,0,1,1.312,5.23a2.685,2.685,0,0,1-.9-.917A2.807,2.807,0,0,1,0,2.846,2.848,2.848,0,0,1,2.846,0a2.648,2.648,0,0,1,.623.072A2.84,2.84,0,0,1,5.691,2.846Z" transform = "translate(7.267 5.991)" fill = "none" stroke = "#696969" stroke - linecap = "round" stroke - linejoin = "round" stroke - width = "0.6" / >
className = { ` flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer
< path id = "Vector-2" data - name = "Vector" d = "M0,.7l.7.7L2.217,0" transform = "translate(9.004 8.136)" fill = "none" stroke = "#696969" stroke - linecap = "round" stroke - linejoin = "round" stroke - width = "0.6" / >
< path id = "Vector-3" data - name = "Vector" d = "M0,0H14.378V14.378H0Z" transform = "translate(14.378 14.378) rotate(180)" fill = "none" opacity = "0" / >
< g id = "Group" transform = "translate(1.983 1.198)" >
< path id = "Vector-4" data - name = "Vector" d = "M10.412,1.21V2.54a2.292,2.292,0,0,1-.605,1.4l-1.054.929a2.648,2.648,0,0,0-.623-.072A2.848,2.848,0,0,0,5.284,7.638,2.807,2.807,0,0,0,5.7,9.106a2.685,2.685,0,0,0,.9.917v.2a1.336,1.336,0,0,1-.545,1.03l-.845.545a1.233,1.233,0,0,1-1.875-1.03V7.567A2.342,2.342,0,0,0,2.846,6.3l-2.3-2.42A2.041,2.041,0,0,1,0,2.666V1.27A1.229,1.229,0,0,1,1.21,0H9.2A1.215,1.215,0,0,1,10.412,1.21Z" fill = "none" stroke = "#696969" stroke - linecap = "round" stroke - linejoin = "round" stroke - width = "0.6" / >
< / g >
< / g >
< / g >
< / s v g >
< / d i v >
< div className = "flex items-center mx-4 pl-6 border-l-2 border-gray-300" >
< div
className = { ` flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer
hover : border - red52 hover : text - red52 hover : bg - pinkF5
hover : border - red52 hover : text - red52 hover : bg - pinkF5
$ { filterCheck [ 0 ] ? 'border-red52 text-red52 bg-pinkF5' : 'border-gray200 text-gray-400' } ` }
$ {
onClick = { prevState => setFilterCheck ( [ ... prevState , filterCheck [ 0 ] = ! filterCheck [ 0 ] ] ) }
filterCheck [ 0 ]
>
? "border-red52 text-red52 bg-pinkF5"
: "border-gray200 text-gray-400"
< h3 > آنلاین < / h 3 >
} ` }
{
onClick = { ( prevState ) =>
filterCheck [ 0 ] && < div className = "flex w-full" style = { { direction : 'ltr' } } >
setFilterCheck ( [
< div className = "w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52" >
... prevState ,
( filterCheck [ 0 ] = ! filterCheck [ 0 ] ) ,
< svg width = "37" height = "37" viewBox = "0 0 24 24" fill = "none" xmlns = "http://www.w3.org/2000/svg" >
] )
< path d = "M7.75 12L10.58 14.83L16.25 9.17004" stroke = "#fff" stroke - width = "1.5" stroke - linecap = "round" stroke - linejoin = "round" / >
}
< / s v g >
>
< h3 > آنلاین < / h 3 >
{ filterCheck [ 0 ] && (
< / d i v >
< div className = "flex w-full" style = { { direction : "ltr" } } >
< / d i v >
< div className = "w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52" >
}
< svg
< / d i v >
width = "37"
< div className = { ` flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer hover:border-red52 hover:text-red52 hover:bg-pinkF5 ${ filterCheck [ 1 ] ? 'border-red52 text-red52 bg-pinkF5' : 'border-gray200 text-gray-400' } ` } >
height = "37"
viewBox = "0 0 24 24"
< h3 > حضوری < / h 3 >
fill = "none"
{
xmlns = "http://www.w3.org/2000/svg"
filterCheck [ 1 ] && < div className = "flex w-full" style = { { direction : 'ltr' } } >
>
< div className = "w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52" >
< path
d = "M7.75 12L10.58 14.83L16.25 9.17004"
< svg width = "37" height = "37" viewBox = "0 0 24 24" fill = "none" xmlns = "http://www.w3.org/2000/svg" >
stroke = "#fff"
< path d = "M7.75 12L10.58 14.83L16.25 9.17004" stroke = "#fff" stroke - width = "1.5" stroke - linecap = "round" stroke - linejoin = "round" / >
stroke - width = "1.5"
< / s v g >
stroke - linecap = "round"
stroke - linejoin = "round"
/ >
< / d i v >
< / s v g >
< / d i v >
< / d i v >
}
< / d i v >
< / d i v >
< div className = "flex items-center mx-4 pl-6 border-l-2 border-gray-300" >
< div className = { ` flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer hover:border-red52 hover:text-red52 hover:bg-pinkF5 ${ filterCheck [ 2 ] ? 'border-red52 text-red52 bg-pinkF5' : 'border-gray200 text-gray-400' } ` } >
< h3 > دختران < / h 3 >
{
filterCheck [ 2 ] && < div className = "flex w-full" style = { { direction : 'ltr' } } >
< div className = "w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52" >
< svg width = "37" height = "37" viewBox = "0 0 24 24" fill = "none" xmlns = "http://www.w3.org/2000/svg" >
< path d = "M7.75 12L10.58 14.83L16.25 9.17004" stroke = "#fff" stroke - width = "1.5" stroke - linecap = "round" stroke - linejoin = "round" / >
< / s v g >
< / d i v >
< / d i v >
}
< / d i v >
< div className = { ` flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer hover:border-red52 hover:text-red52 hover:bg-pinkF5 ${ filterCheck [ 3 ] ? 'border-red52 text-red52 bg-pinkF5' : 'border-gray200 text-gray-400' } ` } >
< h3 > پسران < / h 3 >
{
filterCheck [ 3 ] && < div className = "flex w-full" style = { { direction : 'ltr' } } >
< div className = "w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52" >
< svg width = "37" height = "37" viewBox = "0 0 24 24" fill = "none" xmlns = "http://www.w3.org/2000/svg" >
< path d = "M7.75 12L10.58 14.83L16.25 9.17004" stroke = "#fff" stroke - width = "1.5" stroke - linecap = "round" stroke - linejoin = "round" / >
< / s v g >
< / d i v >
< / d i v >
}
< / d i v >
< / d i v >
< div className = "flex items-center mx-4 pl-6" >
< select className = "bg-white border border-solid border-gray-300 w-72 p-3 rounded-lg text-gray-400 outline-red52" >
{ services . map ( ( item , index ) => (
< option key = { ` Grade__ ${ index } ` } > { item . title } < / o p t i o n >
) ) }
< / s e l e c t >
< / d i v >
< / d i v >
< / d i v >
) }
< div className = { ` flex ${ gameId == 2 && 'flex-col' } items-center w-full justify-center flex-wrap ` } >
< / d i v >
< div
{ books ? . map ( ( product , index ) => (
className = { ` flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer hover:border-red52 hover:text-red52 hover:bg-pinkF5 ${
< Link
filterCheck [ 1 ]
// to={"/class/" + product?.id}
? "border-red52 text-red52 bg-pinkF5"
to = '#'
: "border-gray200 text-gray-400"
onClick = { ( ) => {
} ` }
setPopUpContent ( {
>
title : product ? . name ,
< h3 > حضوری < / h 3 >
video : '' ,
{ filterCheck [ 1 ] && (
teacher : product . vodTeacher ,
< div className = "flex w-full" style = { { direction : "ltr" } } >
description : 'در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت قرار می گیرد در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت' ,
< div className = "w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52" >
price : product . product [ 0 ] . price ,
< svg
classHour : 21 ,
width = "37"
classMinute : 56
height = "37"
} )
viewBox = "0 0 24 24"
setPopUp ( true ) ;
fill = "none"
} }
xmlns = "http://www.w3.org/2000/svg"
>
>
{ /* {console.log(product)} */ }
< path
< Product
d = "M7.75 12L10.58 14.83L16.25 9.17004"
key = { index }
stroke = "#fff"
productsType = { filter . productsType }
stroke - width = "1.5"
product = { product }
stroke - linecap = "round"
index = { Number ( index ) }
stroke - linejoin = "round"
productName = { ` ${ product ? . name } ` }
/ >
productCat = { ` پایه ${ grades [ product ? . gradeId ] } ` }
< / s v g >
productPrice = { product . product [ 0 ] . price }
< / d i v >
// productImg={"https://dnvn.ir/api/v1/file/" + product?.fileIds}
numberOfRegards = { 160 }
productHolderBorder = ''
productHolderHoverBorder = 'shadow-md'
teacher = { product . vodTeacher }
catId = { gameId }
btnOnClick = { ( ) =>
pushToCart ( {
productId : product ? . productId ,
userId : product ? . userId ,
count : 1 ,
} ) }
/ >
< / L i n k >
) ) }
< / d i v >
< / d i v >
) }
< / d i v >
< / d i v >
< div className = "w-1/4 fixed left-0" style = { { height : '100vh' } } >
< / d i v >
< ShoppingCart / >
< div className = "flex items-center mx-4 pl-6 border-l-2 border-gray-300" >
< div
className = { ` flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer hover:border-red52 hover:text-red52 hover:bg-pinkF5 ${
filterCheck [ 2 ]
? "border-red52 text-red52 bg-pinkF5"
: "border-gray200 text-gray-400"
} ` }
>
< h3 > دختران < / h 3 >
{ filterCheck [ 2 ] && (
< div className = "flex w-full" style = { { direction : "ltr" } } >
< div className = "w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52" >
< svg
width = "37"
height = "37"
viewBox = "0 0 24 24"
fill = "none"
xmlns = "http://www.w3.org/2000/svg"
>
< path
d = "M7.75 12L10.58 14.83L16.25 9.17004"
stroke = "#fff"
stroke - width = "1.5"
stroke - linecap = "round"
stroke - linejoin = "round"
/ >
< / s v g >
< / d i v >
< / d i v >
) }
< / d i v >
< div
className = { ` flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer hover:border-red52 hover:text-red52 hover:bg-pinkF5 ${
filterCheck [ 3 ]
? "border-red52 text-red52 bg-pinkF5"
: "border-gray200 text-gray-400"
} ` }
>
< h3 > پسران < / h 3 >
{ filterCheck [ 3 ] && (
< div className = "flex w-full" style = { { direction : "ltr" } } >
< div className = "w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52" >
< svg
width = "37"
height = "37"
viewBox = "0 0 24 24"
fill = "none"
xmlns = "http://www.w3.org/2000/svg"
>
< path
d = "M7.75 12L10.58 14.83L16.25 9.17004"
stroke = "#fff"
stroke - width = "1.5"
stroke - linecap = "round"
stroke - linejoin = "round"
/ >
< / s v g >
< / d i v >
< / d i v >
) }
< / d i v >
< / d i v >
< / d i v >
< div className = "flex items-center mx-4 pl-6" >
< select className = "bg-white border border-solid border-gray-300 w-72 p-3 rounded-lg text-gray-400 outline-red52" >
{ services . map ( ( item , index ) => (
< option key = { ` Grade__ ${ index } ` } > { item . title } < / o p t i o n >
) ) }
< / s e l e c t >
< / d i v >
< / d i v >
< div
className = { ` flex ${
gameId == 2 && "flex-col"
} items - center w - full justify - center flex - wrap ` }
>
{ books ? . map ( ( product , index ) => (
< Link
// to={"/class/" + product?.id}
to = "#"
onClick = { ( ) => {
setPopUpContent ( {
title : product ? . name ,
video : "" ,
teacher : product . vodTeacher ,
description :
"در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت قرار می گیرد در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت" ,
price : product . product [ 0 ] . price ,
classHour : 21 ,
classMinute : 56 ,
} ) ;
setPopUp ( true ) ;
} }
>
{ /* {console.log(product)} */ }
< Product
key = { index }
productsType = { filter . productsType }
product = { product }
index = { Number ( index ) }
productName = { ` ${ product ? . name } ` }
productCat = { ` پایه ${ grades [ product ? . gradeId ] } ` }
productPrice = { product . product [ 0 ] . price }
// productImg={"https://dnvn.ir/api/v1/file/" + product?.fileIds}
numberOfRegards = { 160 }
productHolderBorder = ""
productHolderHoverBorder = "shadow-md"
teacher = { product . vodTeacher }
catId = { gameId }
btnOnClick = { ( ) =>
pushToCart ( {
productId : product ? . productId ,
userId : product ? . userId ,
count : 1 ,
} )
}
/ >
< / L i n k >
) ) }
< / d i v >
< / d i v >
) ;
< / d i v >
< div className = "w-1/4 fixed left-0" style = { { height : "100vh" } } >
< ShoppingCart / >
< / d i v >
< / d i v >
) ;
} ;
} ;
const mapStateToProps = ( state ) => ( {
const mapStateToProps = ( state ) => ( {
isDark : state . publicApi . isDark ,
isDark : state . publicApi . isDark ,
isMobile : state . publicApi . isMobile ,
isMobile : state . publicApi . isMobile ,
books : state . book . list ,
books : state . book . list ,
grades : state . publicApi . grades ,
grades : state . publicApi . grades ,
gradeFilterBooks : state . book . gradeFilterBooks ,
gradeFilterBooks : state . book . gradeFilterBooks ,
selectedGrade : state . book . selectedGrade ,
selectedGrade : state . book . selectedGrade ,
} ) ;
} ) ;
const mapDispatchToProps = {
const mapDispatchToProps = {
getList : book . list ,
getList : book . list ,
gradeFilter : book . gradeFilter ,
gradeFilter : book . gradeFilter ,
setHeaderOptions : publicApi . setHeaderOptions ,
setHeaderOptions : publicApi . setHeaderOptions ,
pushToCart : userProduct . add ,
pushToCart : userProduct . add ,
} ;
} ;
export default connect ( mapStateToProps , mapDispatchToProps ) ( Services ) ;
export default connect ( mapStateToProps , mapDispatchToProps ) ( Services ) ;