Description
Description
When creating a bookmark using the sidebar it doesn't update that state on the FolderView page and if you add bookmark on Folderview page after adding it on the sidebar it Creates two bookmarks for the same video
To Reproduce
Steps to reproduce the behavior:
- Go to any course page and open any folder for e.g. week-1 in webdev
- Open the sidebar add a bookmark to any of the video in week-1
- ERR: notice how the adding a bookmark didn't reflect on the video card in the week-1 folderview
- Now click on the add bookmark on week-1 folderview video card.
- ERR: If you navigate to the bookmarks page now you'll find you have two bookmarks for the same video
Expected behavior
On click on add bookmark on either the videoCard component or the sidebar they should both reflect the change and duplicate bookmark problem would be solved.
Screenshots or GIFs
Bookmark.State.error.mp4
Info (please complete the following information):
- Browser: both firefox and chrome
- Version: [firefox: 136.0.2 (64-bit), chrome: 134.0.6998.117 (Official Build) (64-bit)]
Additional context
The problem is because one component i.e. the FolderView is a server component whereas the sidebar is a client component, since there is no concept of state in between the both the way it works for when you do the steps to reproduce the other way around is because it re-validates the path on the server side for the folderView videoCard component. But it doesn't do that on the client-side for the sidebar