Open
Description
Describe the bug
Mark as completed not working as intended the state of markascompleted resets to original state after the sidebar panel is closed
To Reproduce
Steps to reproduce the behavior:
- Open Course content sidebar
- Mark any video as completed, then wait for the loader.
- Close the sidebar and then reopen
- The checkbox remains in its original state.
- It needs to be refreshed for the changes to reflect.
A clear and concise description of what you expected to happen.
It should be marked as completed even though I closed the sidebar and reopened.
Screenshots or GIFs
https://github.com/user-attachments/assets/e7d8f59d-380c-435d-a604-17d4f23a43ce
Info (please complete the following information):
- Browser Chromium
- Version 21
Additional context
It updates the db but does not fetches the latest data when the sidebar is closed and reopened,so state gains its default value and data is not fetched even though state has changed because of the useCallback hook which caches the handler(mark as completed).