[web][cast] Add slide logs
This commit is contained in:
parent
b3fc9bb682
commit
ecfb7d944d
1 changed files with 13 additions and 0 deletions
|
@ -103,13 +103,26 @@ export default function Slideshow() {
|
||||||
|
|
||||||
const showNextSlide = async () => {
|
const showNextSlide = async () => {
|
||||||
try {
|
try {
|
||||||
|
console.log("showNextSlide");
|
||||||
const currentIndex = collectionFiles.findIndex(
|
const currentIndex = collectionFiles.findIndex(
|
||||||
(file) => file.id === currentFileId,
|
(file) => file.id === currentFileId,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
"showNextSlide-index",
|
||||||
|
currentIndex,
|
||||||
|
collectionFiles.length,
|
||||||
|
);
|
||||||
|
|
||||||
const nextIndex = (currentIndex + 1) % collectionFiles.length;
|
const nextIndex = (currentIndex + 1) % collectionFiles.length;
|
||||||
const nextNextIndex = (nextIndex + 1) % collectionFiles.length;
|
const nextNextIndex = (nextIndex + 1) % collectionFiles.length;
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
"showNextSlide-nextIndex and nextNextIndex",
|
||||||
|
nextIndex,
|
||||||
|
nextNextIndex,
|
||||||
|
);
|
||||||
|
|
||||||
const nextFile = collectionFiles[nextIndex];
|
const nextFile = collectionFiles[nextIndex];
|
||||||
const nextNextFile = collectionFiles[nextNextIndex];
|
const nextNextFile = collectionFiles[nextNextIndex];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue