-
Notifications
You must be signed in to change notification settings - Fork 1.9k
bug: Checkboxes for Notion Content Triggering Unnecessary Backend Requests #1570
Description
Describe the bug
The checkbox component is being rendered for both video and Notion content types. This behavior is not expected, as the checkbox should only appear for video content. Additionally, Notion content checkboxes are sending unnecessary requests to the backend endpoint: api/course/videoProgress/markAsCompleted.
To Reproduce
Steps to reproduce the behavior:
- Go to any course and open the course content.
- Observe that checkboxes are shown for both video and Notion content.
- Notice that for Notion content, unnecessary requests are being sent to the backend endpoint (
/api/course/videoProgress/markAsCompleted) when interacting with the checkboxes.
Expected behavior
Checkboxes should only appear for video content types, and these checkboxes should trigger progress tracking only for video content. For Notion content, only the appropriate file icon should be displayed, without any checkboxes or unnecessary requests to the backend.
Screenshots or GIFs
Info (please complete the following information):
- Browser: [e.g. Chrome, Safari]
- Version: [e.g. 22]
Additional context
The issue arises because the checkbox component is incorrectly being rendered for Notion content, causing unnecessary API requests for progress tracking. The logic should be adjusted to ensure that checkboxes are conditionally rendered only for video content, preventing backend requests.