Created
June 9, 2021 17:27
-
-
Save iddar/5629a563a073ef28f26571b2c62cb420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getNextVideo = () => { | |
setNextLoading(true) | |
for (let i = 0; i < lessons.length; i++) { | |
WatchedLessons.WatchedVideo(lessons[i].doc ?? '', user?.uid).then(res => { | |
if (res) { | |
setNext(lessons[i + 1]) | |
} | |
}) | |
setNextLoading(false) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment