Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Smnthjm08 opened this issue Nov 18, 2024 · 0 comments · May be fixed by #1571
Open

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

Smnthjm08 opened this issue Nov 18, 2024 · 0 comments · May be fixed by #1571
Labels
bug Something isn't working

Comments

@Smnthjm08
Copy link
Contributor

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.

@Smnthjm08 Smnthjm08 added the bug Something isn't working label Nov 18, 2024
@Smnthjm08 Smnthjm08 changed the title bug: bug: Checkboxes for Notion Content Triggering Unnecessary Backend Requests Nov 18, 2024
@Smnthjm08 Smnthjm08 linked a pull request Nov 18, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant