Skip to content

Commit d1c4c93

Browse files
committed
clear selection on modal close
1 parent 7f1444c commit d1c4c93

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

web/src/shared/video-tutorials/VideoTutorialsModal.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ export const VideoTutorialsModal = () => {
1818
useEffect(() => {
1919
if (isOpen && sections.length > 0 && sections[0].videos.length > 0) {
2020
setSelectedVideo(sections[0].videos[0]);
21+
} else {
22+
// Clear selection when modal is closed or when there are no videos to show
23+
setSelectedVideo(null);
2124
}
2225
}, [isOpen, sections]);
2326

0 commit comments

Comments
 (0)