|
|
|
@ -186,13 +186,27 @@ const MyExamList = ({isMobile}) => { |
|
|
|
|
if (window.innerWidth < 1170) { |
|
|
|
|
max_i--; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const move_left = () => { |
|
|
|
|
if (i > max_i) { |
|
|
|
|
i--; |
|
|
|
|
let movment = i * 245; |
|
|
|
|
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 = () => { |
|
|
|
@ -200,6 +214,18 @@ const MyExamList = ({isMobile}) => { |
|
|
|
|
i++; |
|
|
|
|
let movment = i * 245; |
|
|
|
|
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; |
|
|
|
@ -276,8 +302,8 @@ const MyExamList = ({isMobile}) => { |
|
|
|
|
</div> |
|
|
|
|
))} |
|
|
|
|
<div className="melc-h-move-btns"> |
|
|
|
|
<IoIosArrowBack onClick={move_left} /> |
|
|
|
|
<IoIosArrowForward onClick={move_right} /> |
|
|
|
|
<span className="back-btn"><IoIosArrowBack onClick={move_left}/></span> |
|
|
|
|
<span className="forward-btn"> <IoIosArrowForward onClick={move_right}/></span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<ScrollContainer className="melc-content"> |
|
|
|
|