|
|
|
@ -110,7 +110,7 @@ class InfosCourse extends Component{
|
|
|
|
|
this.getCourses(category, status, 1, sort_by, "desc");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updatedlists(sort_direction, i) {
|
|
|
|
|
updatedlists(sort_directions, i) {
|
|
|
|
|
// console.log("updatedlistssort_direction");
|
|
|
|
|
// console.log(sort_direction);
|
|
|
|
|
// console.log(i);
|
|
|
|
@ -118,8 +118,20 @@ class InfosCourse extends Component{
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpin: true
|
|
|
|
|
});
|
|
|
|
|
let {category, status, page, sort_by} = this.state;
|
|
|
|
|
this.getCourses(category, status, page, sort_by, sort_direction);
|
|
|
|
|
|
|
|
|
|
let {category, status, page, sort_by, sort_direction} = this.state;
|
|
|
|
|
let sort_directiony = sort_directions;
|
|
|
|
|
if (sort_directions === "asc") {
|
|
|
|
|
if (sort_directions === sort_direction) {
|
|
|
|
|
sort_directiony = "desc"
|
|
|
|
|
}
|
|
|
|
|
} else if (sort_directions === "desc") {
|
|
|
|
|
if (sort_directions === sort_direction) {
|
|
|
|
|
sort_directiony = "asc"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.getCourses(category, status, page, sort_by, sort_directiony);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|