-u level logic

This commit is contained in:
Dimas Atmodjo 2024-11-03 14:00:22 +07:00
parent be9aba3355
commit 59e1bee2a7

View File

@ -71,17 +71,22 @@ const Level = () => {
Not Allowed Not Allowed
</div> </div>
) : ( ) : (
level.SCORE < 65 ?( // level.SCORE < 65 ?(
// <Button variant='warning' className='py-2 px-5 w-fit rounded-35'
// as={Link} to={level.IS_PRETEST === 1 ? `/learning/module/${section}/${topic}/pretest/material` : `/learning/module/${section}/${topic}/level-${index}/material`}
// >
// Learn Now
// </Button>
// ) : (
// <div className='py-2 px-5 bg-warning w-fit rounded-35'>
// Finished
// </div>
// )
<Button variant='warning' className='py-2 px-5 w-fit rounded-35' <Button variant='warning' className='py-2 px-5 w-fit rounded-35'
as={Link} to={level.IS_PRETEST === 1 ? `/learning/module/${section}/${topic}/pretest/material` : `/learning/module/${section}/${topic}/level-${index}/material`} as={Link} to={level.IS_PRETEST === 1 ? `/learning/module/${section}/${topic}/pretest/material` : `/learning/module/${section}/${topic}/level-${index}/material`}
> >
Learn Now Learn Now
</Button> </Button>
) : (
<div className='py-2 px-5 bg-warning w-fit rounded-35'>
Finished
</div>
)
)} )}
</div> </div>
</Col> </Col>