fix: video activity bug

This commit is contained in:
swve 2024-05-03 17:13:07 +02:00
parent ae7b7a7f93
commit a0966e90e3
3 changed files with 49 additions and 39 deletions

View file

@ -24,7 +24,9 @@ function VideoActivity({ activity, course }: { activity: any; course: any }) {
}
React.useEffect(() => {
console.log(activity)
if (activity && activity.content && activity.content.uri) {
setVideoId(getYouTubeEmbed(activity.content.uri).videoId)
}
}, [activity, org])
return (