feat: students should move to next lesson on click go to lesson (#230)
* completion * completion * PR Fixes * PR Fixes * fix: progress bug on home page * chore: fix lesson completion issue --------- Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
co-authored by
Rotimi Best
parent
db38756cbf
commit
1277bcbfc6
@@ -7,7 +7,7 @@
|
||||
|
||||
const gotoCourse = (id: string | undefined) => {
|
||||
if (!id) return;
|
||||
goto(`/courses/${id}`);
|
||||
goto(`/courses/${id}/lessons?next=true`);
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -41,7 +41,9 @@
|
||||
</span>
|
||||
<div class="relative bg-[#EAEAEA] w-full h-1">
|
||||
<div
|
||||
style="width:{course.progress_rate}%"
|
||||
style="width: {Math.round(
|
||||
((course?.progress_rate ?? 0) / (course?.total_lessons ?? 0)) * 100
|
||||
) || 0}%"
|
||||
class={`absolute top-0 left-0 bg-primary-700 h-full`}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user