labrocadabro / communitytaught

MIT License
78 stars 31 forks source link

fix: Logic for lesson checking "done" class #38

Closed coltonehrman closed 8 months ago

coltonehrman commented 8 months ago

Closes #24

This adds a boolean value hasCheckIn to confirm if the lesson has a checkIn or not. The boolean is used across the lesson card to correctly render the lesson.

labrocadabro commented 8 months ago

Thank you, but next time please ask to be assigned to an issue before working on it. We don't want multiple people working the same issue as someone's effort will be wasted.

This looks good, but line 5 has gotten a bit hard to read with all that boolean logic in the condition (lesson.watched && (!hasCheckIn || lesson.checkedIn)) || !lesson.videoId). Let's extract that out into an isDone variable, just to make that line more readable.

coltonehrman commented 8 months ago

Thank you, but next time please ask to be assigned to an issue before working on it. We don't want multiple people working the same issue as someone's effort will be wasted.

This looks good, but line 5 has gotten a bit hard to read with all that boolean logic in the condition (lesson.watched && (!hasCheckIn || lesson.checkedIn)) || !lesson.videoId). Let's extract that out into an isDone variable, just to make that line more readable.

Done

labrocadabro commented 8 months ago

Thank you!