Skip to content

bug: Checkboxes for Notion Content Triggering Unnecessary Backend Requests #1570

@Smnthjm08

Description

@Smnthjm08

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:

  1. Go to any course and open the course content.
  2. Observe that checkboxes are shown for both video and Notion content.
  3. 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

Screenshot 2024-11-18 at 8 28 32 PM

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions