|
|
@ -192,7 +192,21 @@ const MyExamList = ({isMobile}) => { |
|
|
|
i--; |
|
|
|
i--; |
|
|
|
let movment = i * 245; |
|
|
|
let movment = i * 245; |
|
|
|
document.querySelector(".melc-content-item").style.right = `${movment}px`; |
|
|
|
document.querySelector(".melc-content-item").style.right = `${movment}px`; |
|
|
|
|
|
|
|
console.log(document.querySelector(".melc-content-item").style.right) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(document.querySelector(".melc-content-item").style.right !== 0){ |
|
|
|
|
|
|
|
// setRightBtnColor('#df1452')
|
|
|
|
|
|
|
|
document.querySelector('.forward-btn').style.color = '#df1452' |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
document.querySelector('.forward-btn').style.color = '#ececec' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(i == max_i){ |
|
|
|
|
|
|
|
document.querySelector('.back-btn').style.color = '#ececec' |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
document.querySelector('.back-btn').style.color = '#df1452' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const move_right = () => { |
|
|
|
const move_right = () => { |
|
|
@ -200,6 +214,18 @@ const MyExamList = ({isMobile}) => { |
|
|
|
i++; |
|
|
|
i++; |
|
|
|
let movment = i * 245; |
|
|
|
let movment = i * 245; |
|
|
|
document.querySelector(".melc-content-item").style.right = `${movment}px`; |
|
|
|
document.querySelector(".melc-content-item").style.right = `${movment}px`; |
|
|
|
|
|
|
|
console.log(document.querySelector(".melc-content-item").style.right) |
|
|
|
|
|
|
|
if(document.querySelector(".melc-content-item").style.right !== '0px'){ |
|
|
|
|
|
|
|
// setRightBtnColor('#df1452')
|
|
|
|
|
|
|
|
document.querySelector('.forward-btn').style.color = '#df1452' |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
document.querySelector('.forward-btn').style.color = '#ececec' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(i == max_i){ |
|
|
|
|
|
|
|
document.querySelector('.back-btn').style.color = '#ececec' |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
document.querySelector('.back-btn').style.color = '#df1452' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
let s = 0; |
|
|
|
let s = 0; |
|
|
@ -276,8 +302,8 @@ const MyExamList = ({isMobile}) => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
))} |
|
|
|
))} |
|
|
|
<div className="melc-h-move-btns"> |
|
|
|
<div className="melc-h-move-btns"> |
|
|
|
<IoIosArrowBack onClick={move_left} /> |
|
|
|
<span className="back-btn"><IoIosArrowBack onClick={move_left}/></span> |
|
|
|
<IoIosArrowForward onClick={move_right} /> |
|
|
|
<span className="forward-btn"> <IoIosArrowForward onClick={move_right}/></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<ScrollContainer className="melc-content"> |
|
|
|
<ScrollContainer className="melc-content"> |
|
|
|