mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-06 18:31:00 +00:00
Logs for errors
This commit is contained in:
parent
45b6b66f33
commit
178fb6a927
@ -52,12 +52,17 @@ export default function VideosCarousel() {
|
|||||||
try {
|
try {
|
||||||
if (videos && videos.length > 0 && paidLessons.length > 0) {
|
if (videos && videos.length > 0 && paidLessons.length > 0) {
|
||||||
const processedVideos = videos.map(video => parseEvent(video));
|
const processedVideos = videos.map(video => parseEvent(video));
|
||||||
|
console.log("processedVideos", processedVideos);
|
||||||
|
|
||||||
const sortedVideos = processedVideos.sort((a, b) => b.created_at - a.created_at);
|
const sortedVideos = processedVideos.sort((a, b) => b.created_at - a.created_at);
|
||||||
|
|
||||||
|
console.log("paidLessons", paidLessons);
|
||||||
|
|
||||||
// filter out videos that are in the paid lessons array
|
// filter out videos that are in the paid lessons array
|
||||||
const filteredVideos = sortedVideos.filter(video => !paidLessons.includes(video?.resource?.resourceId));
|
const filteredVideos = sortedVideos.filter(video => !paidLessons.includes(video?.resource?.resourceId));
|
||||||
|
|
||||||
|
console.log("filteredVideos", filteredVideos);
|
||||||
|
|
||||||
setProcessedVideos(filteredVideos);
|
setProcessedVideos(filteredVideos);
|
||||||
} else {
|
} else {
|
||||||
console.log('No videos fetched or empty array returned');
|
console.log('No videos fetched or empty array returned');
|
||||||
|
@ -58,7 +58,6 @@ export function useVideos() {
|
|||||||
if (isClient && contentIds) {
|
if (isClient && contentIds) {
|
||||||
fetchVideosFromNDK().then(fetchedVideos => {
|
fetchVideosFromNDK().then(fetchedVideos => {
|
||||||
if (fetchedVideos && fetchedVideos.length > 0) {
|
if (fetchedVideos && fetchedVideos.length > 0) {
|
||||||
console.log('fetchedvideos', fetchedVideos)
|
|
||||||
setVideos(fetchedVideos);
|
setVideos(fetchedVideos);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user