From ecfb7d944dd468770e140b5f6a71d8305ac20acd Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:45:35 +0530 Subject: [PATCH] [web][cast] Add slide logs --- web/apps/cast/src/pages/slideshow.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/web/apps/cast/src/pages/slideshow.tsx b/web/apps/cast/src/pages/slideshow.tsx index b860523ab..11b34baf7 100644 --- a/web/apps/cast/src/pages/slideshow.tsx +++ b/web/apps/cast/src/pages/slideshow.tsx @@ -103,13 +103,26 @@ export default function Slideshow() { const showNextSlide = async () => { try { + console.log("showNextSlide"); const currentIndex = collectionFiles.findIndex( (file) => file.id === currentFileId, ); + console.log( + "showNextSlide-index", + currentIndex, + collectionFiles.length, + ); + const nextIndex = (currentIndex + 1) % collectionFiles.length; const nextNextIndex = (nextIndex + 1) % collectionFiles.length; + console.log( + "showNextSlide-nextIndex and nextNextIndex", + nextIndex, + nextNextIndex, + ); + const nextFile = collectionFiles[nextIndex]; const nextNextFile = collectionFiles[nextNextIndex];