mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
add more things
This commit is contained in:
@@ -117,7 +117,11 @@ const ReadCourse = ({ title = "Read Course", courses = [], groupId, taskListId,
|
||||
const isFetching = fetching[course.reference_id];
|
||||
|
||||
// ── Locked card ───────────────────────────────────────────────────
|
||||
if (isLocked) {
|
||||
// Skipped when already completed — a completion recorded while the
|
||||
// content was accessible still counts even if it re-locks later
|
||||
// (task_progress/reading-progress rows are never revoked on a tier
|
||||
// change), so it must keep showing as Completed, not Locked.
|
||||
if (isLocked && !done) {
|
||||
return (
|
||||
<div
|
||||
key={course.id}
|
||||
|
||||
@@ -85,7 +85,11 @@ const ReadLesson = ({ title = "Read Lessons", lessons = [], groupId, taskListId,
|
||||
const isFetching = fetching[lesson.reference_id];
|
||||
|
||||
// ── Locked card ───────────────────────────────────────
|
||||
if (isLocked) {
|
||||
// Skipped when already completed — a completion recorded
|
||||
// while the lesson was accessible still counts even if it
|
||||
// re-locks later (reading-progress rows are never revoked
|
||||
// on a tier change), so it must keep showing as Completed.
|
||||
if (isLocked && !lesson.completed) {
|
||||
return (
|
||||
<div
|
||||
key={lesson.id}
|
||||
|
||||
@@ -104,7 +104,11 @@ const ReadUnit = ({ title = "Read Units", units = [], groupId, taskListId, taskI
|
||||
const isFetching = fetching[unit.reference_id];
|
||||
|
||||
// ── Locked card ───────────────────────────────────
|
||||
if (isLocked) {
|
||||
// Skipped when already completed — a completion recorded
|
||||
// while the unit was accessible still counts even if it
|
||||
// re-locks later (reading-progress rows are never revoked
|
||||
// on a tier change), so it must keep showing as Completed.
|
||||
if (isLocked && !unit.completed) {
|
||||
return (
|
||||
<div
|
||||
key={unit.id}
|
||||
|
||||
Reference in New Issue
Block a user